Closed simonw closed 4 years ago
Two new parameters which specify what should happen if the view already exists. I want this for https://github.com/dogsheep/github-to-sqlite/issues/37
Here's the current create_view() implementation:
create_view()
https://github.com/simonw/sqlite-utils/blob/b4d953d3ccef28bb81cea40ca165a647b59971fa/sqlite_utils/db.py#L325-L332
ignore=True will not do anything if the view exists already.
ignore=True
replace=True will drop and redefine the view - but only if its SQL definition differs, otherwise it will be left alone.
replace=True
Docs: https://sqlite-utils.readthedocs.io/en/latest/python-api.html#creating-views
Two new parameters which specify what should happen if the view already exists. I want this for https://github.com/dogsheep/github-to-sqlite/issues/37
Here's the current
create_view()
implementation:https://github.com/simonw/sqlite-utils/blob/b4d953d3ccef28bb81cea40ca165a647b59971fa/sqlite_utils/db.py#L325-L332
ignore=True
will not do anything if the view exists already.replace=True
will drop and redefine the view - but only if its SQL definition differs, otherwise it will be left alone.