jonpryor / dblinq2007

Automatically exported from code.google.com/p/dblinq2007
0 stars 0 forks source link

Linq to MySQL Bug #201

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I use the column name like 'name'

I think it should generate the sql command is

insert into table(`name`) values('a')

but now is

insert into table(name) values('a')

I used DBLinq-0.19

Thanks

Original issue reported on code.google.com by chenshen...@gmail.com on 15 Feb 2010 at 2:35

GoogleCodeExporter commented 9 years ago
What is the bug?

'name' is a valid identifier in many databases; for example, this works fine in 
SQLlite:

    create table foo (name as char);
    insert into foo(name) values ('a');

Databases providers can override SqlProvider.GetSafeNamePart(), 
SqlProvider.IsMadeSafe(), SqlProvider.IsNameSafe(), 
SqlProvider.IsNameCaseSafe(), or 
SqlProvider.MakeNameSafe() to add additional keywords and "unsafe" words.

Original comment by jonmpr...@gmail.com on 10 Mar 2010 at 8:13