Open fvisticot opened 6 years ago
Thanks for the note. I added some docs regarding supported types: https://github.com/tekartik/sembast.dart/blob/master/doc/data_types.md
Indeed DateTime is not supported currently. I recommend storing them as int (millisSinceEpoch) for sorting and queries
Tx for the update. Would be nice to able to query by date based on entity with isoString support. My model is coming from a REST API and I would like to share serialization / deserialization with DB and API.
@alextekartik is this something we will see in the future? (support for DateTime)
DateTime is not consistent on Flutter/VM (microseconds precision) and Web (milliseconds precision). Sembast supports Timestamp instead that you convert to and from DateTime.
It seems DateTime type is not supported. I get an exception when trying to add document with DateTime type. Do I need to serialize DateTime properties ? How to make a query based on time ?