You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't currently support things like this in SQLite:
classMyTable(Table):
times=Array(Time())
SQLite doesn't have native support for array columns. The way we support it in Piccolo is by serialising the array into a string before storing it in the database, and deserialising it again when querying the row.
We use JSON to do the serialisation / deserialisation, which doesn't support datetime / date / time out of the box.
To support this, we'll need to create new row types for SQLite - like ARRAY_TIME / ARRAY_TIMESTAMP etc. When we read data from a row with this column type, we know we need to deserialise the values back into a list of Python objects.
One of the reasons we need this functionality is because we're doing a lot of improvements to arrays in Piccolo Admin, and we often test on SQLite.
The text was updated successfully, but these errors were encountered:
We don't currently support things like this in SQLite:
SQLite doesn't have native support for array columns. The way we support it in Piccolo is by serialising the array into a string before storing it in the database, and deserialising it again when querying the row.
We use JSON to do the serialisation / deserialisation, which doesn't support
datetime
/date
/time
out of the box.To support this, we'll need to create new row types for SQLite - like
ARRAY_TIME
/ARRAY_TIMESTAMP
etc. When we read data from a row with this column type, we know we need to deserialise the values back into a list of Python objects.One of the reasons we need this functionality is because we're doing a lot of improvements to arrays in Piccolo Admin, and we often test on SQLite.
The text was updated successfully, but these errors were encountered: