Re: [racket-users] db module + SQLite driver + 'ON CONFLICT' = syntax error

2019-04-19 Thread Ryan Culpepper
On 4/18/19 23:53, David Storrs wrote: On Thu, Apr 18, 2019 at 5:42 PM Ryan Culpepper > wrote: Use "INSERT OR IGNORE" instead. See https://sqlite.org/lang_conflict.html, 3rd paragraph. Yep.  Unfortunately, this was a simplified case of wanting to use OR DO

Re: [racket-users] db module + SQLite driver + 'ON CONFLICT' = syntax error

2019-04-19 Thread Ryan Culpepper
Use "INSERT OR IGNORE" instead. See https://sqlite.org/lang_conflict.html, 3rd paragraph. Ryan On 4/18/19 23:28, David Storrs wrote: On Thu, Apr 18, 2019 at 4:48 PM Jon Zeppieri > wrote: It might well be the SQLlite version. This is a pretty new feature.

Re: [racket-users] db module + SQLite driver + 'ON CONFLICT' = syntax error

2019-04-18 Thread David Storrs
On Thu, Apr 18, 2019 at 5:42 PM Ryan Culpepper wrote: > Use "INSERT OR IGNORE" instead. See > https://sqlite.org/lang_conflict.html, 3rd paragraph. > Yep. Unfortunately, this was a simplified case of wanting to use OR DO UPDATE to make this actually an upsert. When I started seeing this issue

Re: [racket-users] db module + SQLite driver + 'ON CONFLICT' = syntax error

2019-04-18 Thread David Storrs
On Thu, Apr 18, 2019 at 4:48 PM Jon Zeppieri wrote: > It might well be the SQLlite version. This is a pretty new feature. It's > possible that the db library is using an older version than your CLI client. > Got it. Is there any way for me to address the situation aside from "Don't use that SQL

Re: [racket-users] db module + SQLite driver + 'ON CONFLICT' = syntax error

2019-04-18 Thread Jon Zeppieri
It might well be the SQLlite version. This is a pretty new feature. It's possible that the db library is using an older version than your CLI client. - Jon On Thu, Apr 18, 2019 at 4:03 PM David Storrs wrote: > I'm having trouble with using the the 'ON CONFLICT' clause with a SQLite > database.

[racket-users] db module + SQLite driver + 'ON CONFLICT' = syntax error

2019-04-18 Thread David Storrs
I'm having trouble with using the the 'ON CONFLICT' clause with a SQLite database. Example: > (query-exec db "drop table if exists peers") > (query-exec db "create table if not exists peers (name text)") > (query-exec db "INSERT INTO peers ( name ) VALUES ($1)" "hqwt") > (query-rows db "SELECT *