3 ms·
i like the cute embedding approach (let users write sql directly in an sexpr and then transform it to sql in a macro) but i am wondering if there are any corner
by andrewcooke 14y ago
i like the cute embedding approach (let users write sql directly in an sexpr and then transform it to sql in a macro) but i am wondering if there are any corner cases that break. for example, in postgres, names are quoted using (if i remember correctly) double quotes, while strings are single quotes. would that cause problems?
[edit: swapped double and single, sorry]
- redraiment 14y agoYou are right! Hence, during the process in edbc.el, it would wrap the string with quote('), and replace every quote in the string to two quotes('', not double quotes).
- andrewcooke 14y agono, you're misunderstanding me (i think?). what you describe escapes strings - it sounds correct, but it is not what i am asking about. for example, when using postgres you might want (for some crazy reason) to have a table called "select". you can do that with: select * from "select"; where the "select" is not a string, but a quoted name. without the quotes it would be a syntax error (as select is a reserved word). how would that work in edbc?
- redraiment 14y agoOh, I got it... It will be problem currently. I'll put it in TODO list. Thanks! ^_^