Skip to content
Discussion options

You must be logged in to vote

This looks OK to me.

Is there a better recommended way to handle bulk inserts/updates/upserts?

You can try the on_conflict clause - I use this quite a lot for upserts:

https://piccolo-orm.readthedocs.io/en/latest/piccolo/query_clauses/on_conflict.html#on-conflict

The advantage of the Postgres MERGE command is it does insert/update/delete (i.e. can also do deletes). I think it would be cool if we could add it to Piccolo somehow.

If there is a function that I can use to escape values directly? I thought QueryString does that but it doesn't seem to escape quotes, at least in the way I'm using it - entirely possible I'm not understanding how to use it correctly.

QueryString doesn't do any…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dantownsend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants