We don't currently support things like this in SQLite:
class MyTable(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.
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.