Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"when" column breaks the store #9

Open
mihaidma opened this issue Aug 23, 2016 · 5 comments
Open

"when" column breaks the store #9

mihaidma opened this issue Aug 23, 2016 · 5 comments

Comments

@mihaidma
Copy link
Collaborator

"when" column breaks the store, needs to check if an escape is missing
senecajs/seneca-user#51

@wzrdtales
Copy link

Same as senecajs/seneca-mysql-store#57

@wzrdtales
Copy link

The correct escape char should be defined on the driver level and passed to this module afterwards. E.g. mysql needs to use ` instead of " or '.

@mihaidma
Copy link
Collaborator Author

@wzrdtales please see this code:
https://github.com/senecajs-labs/seneca-standard-query/blob/master/standard-query.js#L23

in what case is your query escaped with " or ' ?

@wzrdtales
Copy link

@mihaidma This is actually database dependend. You need to look for evey database you support.

See for example MySQL http://dev.mysql.com/doc/refman/5.7/en/identifiers.html where backticks are needed to escape schema objects.

@wzrdtales
Copy link

And this given, the escape char must be defined on the driver not on this library. Otherwise this library can get useless for some new driver that has other needs which it can't pass along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants