pudo / dataset

Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.
https://dataset.readthedocs.org/
MIT License
4.78k stars 298 forks source link

Support for unique indexes and multicolumn indexes #332

Open vladiscripts opened 4 years ago

vladiscripts commented 4 years ago

Could you add the ability to read existing unique indexes and multicolumn indexes from the current database model? In order not to list them each time in insert (keys) and upsert (keys).

pudo commented 4 years ago

It'd be kind of cool to use a unique index for the upsert when it is available, would love to see a PR to do that. Essentially, I guess it would make the keys argument optional.