Re: [racket-users] Re: db module 'query' does not return insert-id

2019-04-24 Thread David Storrs
Yep, thanks. I've been using RETURNING pretty extensively to get not just the ID but other fields as well. It's ridiculously convenient. Unfortunately, I'm migrating to SQLite now and they don't support RETURNING so I was trying to use the simple-result struct. I'm not sure why I used a Pg conne

[racket-users] Re: db module 'query' does not return insert-id

2019-04-24 Thread Simon Schlee
> > (require db) > > (define db (postgresql-connect ...args...)) > > (simple-result-info (query db "insert into collaborations (name) values > ('foojalskdsfls')")) > '((insert-id . #f) (affected-rows . 1)) > With postgresql instead of doing a plain insert you can use returning to return your