damil / SQL-Abstract-More

extension to SQL-Abstract with named parameters and support for several additional SQL clauses
https://metacpan.org/pod/SQL::Abstract::More
6 stars 10 forks source link

honor SQL::Abstract quoting settings #6

Closed sezal closed 8 years ago

sezal commented 9 years ago

Hi Laurent,

please review my fixes to apply SQLA's quote_char and name_sep settings. SQL::Abstract itself quotes table names and columns, but since SQLA::More generates "FROM ..." part it responsible for quoting. This includes: table names, alias names, column names in ON conditions. It's still possible that something it's not handled by this fix.

Also consider using $sqla->_recurse_where() to get conditions without WHERE (...) wrapper. This change requires to update so many tests (including DBIx::DataModel's) because "()" will be eliminated as well. So I left this decision for your consideration.

damil commented 8 years ago

Oops - sorry sezal, I had totally forgotten this pull request, and just committed another implementation for quote_char. Thanks for your contribution anyway, and please tell me if you encounter any quoting problems in version 1.28.

sezal commented 8 years ago

I'm sorry it took me so long time to get back to you. The only (potential) issue I was able to find is regarding non-standard "name_sep" (see comments in the code)

jrouzierinverse commented 7 years ago

Thanks that fixed it I will close my issue