sqlalchemy-rqlite
sqlalchemy-rqlite copied to clipboard
Error if datetime columns are empty/null
I get the following error unless I set defaults in datetime columns:
venv/lib/python3.8/site-packages/pyrqlite/extensions.py", line 111, in <lambda> 'DATETIME': lambda x: x.replace('T', ' ').rstrip('Z')
Defaults must be set.
I do not know the source of the error, but you shoudl set explicit date and timestamps in any event when using rqlite. Non-deterministic functions in SQLite are not currrently supported -- see https://rqlite.io/docs/api/non-deterministic/
Any comment @zmedico ?
Sqlite3 itself accepts empty/null/None Datetime columns. Problem occured when I switched from Sqlite3 to Rqlite. However, it was easy fixed by setting default timestamp for column.
Please test with pyrqlite 2.2.3 which has the fix from https://github.com/rqlite/pyrqlite/pull/62.
Please reopen if you think this is not the same as https://github.com/rqlite/pyrqlite/issues/51 fixed by https://github.com/rqlite/pyrqlite/pull/62.