Replies: 4 comments 3 replies
-
Hi ! Thanks for reporting the parsing issue. I opened a pull request to fix it upstream: apache/datafusion-sqlparser-rs#1530 |
Beta Was this translation helpful? Give feedback.
-
For the transaction issue, let me dig into it in more details, and I'll come back to you about it soon. |
Beta Was this translation helpful? Give feedback.
-
My fix for the update or replace bug was just approved in the parser. It should get into SQLPage on December the 11th apache/datafusion-sqlparser-rs#1517 |
Beta Was this translation helpful? Give feedback.
-
Is the remaining question in your discussion related to mine @vtzi ? I'm having trouble learning how sqlpage manages transactions. The goal being to create and drop temporary tables in a single transaction. I'm using postgres, not sqlite, but observe that sqlpage does not commit. |
Beta Was this translation helpful? Give feedback.
-
SQLite has ON CONFLICT clause that is very handy to bulk insert/update with a single sql statement where otherwise you'll need to begin/commit transaction and do some bookkeeping and handling of conflicts.
https://www.sqlite.org/lang_conflict.html
When trying to use this with SQLPage I get a parsing error:
I guess that's not SQLPage but rather sqlx issue but would be nice to get reported somewhere.
On a related note - what is the good way to handle errors within multi-statement transactions?
E.g.
My experience with SQLite, is that an error inside the transaction leaves the connection with an open transaction (which later can lead to way more serious issues). It'll be good to be able to rollback on errors (or simpler from implementation pov - close/reopen the connection which should invoke the rollback).
Beta Was this translation helpful? Give feedback.
All reactions