eaigner / hood

Database agnostic ORM for Go
MIT License
710 stars 52 forks source link

Add quoting to dialect interface #24

Closed coocood closed 11 years ago

coocood commented 11 years ago

The TestCreateTableSql case trying to create a column named "primary", I'm not sure it is intentionally or not, but this will not work in mysql, unless we wrap the talbe or column name with back quotes.

but the base dialect do not give a chance to wrap a table|column name with back quotes which means every method in it have to be rewritten for mysql dialect to support keyword table/columns.

What should I do?

eaigner commented 11 years ago

No, it was not intentional. If you wish to use quoted fields you have to pass them in manually at the moment, e.g.

`"primary"`
eaigner commented 11 years ago

All identifiers are now quoted automatically (except in where clauses)