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.76k stars 297 forks source link

ensure database exists #433

Open ianengelbrecht opened 2 weeks ago

ianengelbrecht commented 2 weeks ago

I'm only using dataset with sqlite, but very greatful for its simplicity. I'd like to suggest to include a parameter in dataset.connect giving the option to check whether the database exists or not, and either throwing or returning None if it does not. So something like ensure_schema, but perhaps ensure_exists.