mcfunley / pugsql

A HugSQL-inspired database library for Python
https://pugsql.org
Apache License 2.0
673 stars 22 forks source link

Support tuple lists #9

Closed mcfunley closed 5 years ago

mcfunley commented 5 years ago

This is necessary for multi-inserts:

https://www.hugsql.org/#param-tuple-list

Hopefully there's a way to do this without ditching sqlalchemy's interpolation.

mcfunley commented 5 years ago

This didn't turn out to be necessary for multi-row inserts. Instead I made this work:

queries.create_foo([
  { 'id': 2, 'val': 'x' },
  { 'id': 3, 'val': 'y' },
  { 'id': 4, 'val': 'z' },
])