Closed leandrogehlen closed 1 month ago
When you have a field with format: "date-time"
, then the type
is still string
. So you can only store plain strings in RxDB. You can do whatever operators or indexing on that. If your date format is sortable, you can apply $gt and index it.
@pubkey, thanks for the answer.
It could be helpful to have a doc section for this topic
Yes good idea. I added it to the docs.
Hello, i'm trying create index on date-time
attribute and i'm receiving the follow message.
I'm using getRxStorageIndexedDB
storage
Please make a PR with a test case. But from your error it looks like you set type: "date-time"
which will not work.
I'm confusing... I understood that date-time
type supports index
If your date format is sortable, you can apply $gt and index it.
But still you need a valid json schema and cannot put date-time as type, only as "format".
I'm sorry, i did not pay attention about it.
I have some questions regarding the
date-time
data type: