[racket-users] Re: inspecting a table error 'error 'query: multiple statements given'
FYI, the misleading "multiple statements given" error has been fixed in the racket master branch and correct syntax error message is now being raised. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Re: inspecting a table error 'error 'query: multiple statements given'
On Monday, April 17, 2017 at 11:41:59 PM UTC+8, Alexander McLin wrote: > The error message is unclear but I believe SQLite do not support parameters > for PRAGMA statements. I worked extensively with Racket + SQLite and I can attest that the "multiple statements given" message should be interpreted as "syntax error". I'm not sure if this error comes form Racket or SQLite though. Alex. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Re: inspecting a table error 'error 'query: multiple statements given'
Thanks! On Mon, 17 Apr 2017 at 16:42, Alexander McLinwrote: > The error message is unclear but I believe SQLite do not support > parameters for PRAGMA statements. > > The SQLite documentation at http://www.sqlite.org/lang_expr.html#varparam > specifically says parameters are supported by expressions. PRAGMA > statements are not expressions. > > If you examine the SQL syntax structure defined for expressions at > http://www.sqlite.org/lang_expr.html, you'll see PRAGMA is not part of > the definition. > > If you execute the following: (query db "PRAGMA table_info($1)"). It > generates the same error without any parameter arguments being passed > along. It makes me think the error may be arising from an internal parsing > error and probably could be improved on. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Kind regards, Stephen -- -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Re: inspecting a table error 'error 'query: multiple statements given'
The error message is unclear but I believe SQLite do not support parameters for PRAGMA statements. The SQLite documentation at http://www.sqlite.org/lang_expr.html#varparam specifically says parameters are supported by expressions. PRAGMA statements are not expressions. If you examine the SQL syntax structure defined for expressions at http://www.sqlite.org/lang_expr.html, you'll see PRAGMA is not part of the definition. If you execute the following: (query db "PRAGMA table_info($1)"). It generates the same error without any parameter arguments being passed along. It makes me think the error may be arising from an internal parsing error and probably could be improved on. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.