Hi guys,
Imagine having the following Datomic schema:
[{:db/ident :group/name :db/valueType :db.type/string :db/cardinality :db.cardinality/one :db/unique :db.unique/value :db/doc "group name"} {:db/ident :group/items :db/valueType :db.type/ref :db/cardinality :db.cardinality/many :db/isComponent true :db/doc "group items"} {:db/ident :item/t :db/valueType :db.type/instant :db/cardinality :db.cardinality/one :db/doc "item t"} {:db/ident :item/content :db/valueType :db.type/bytes :db/cardinality :db.cardinality/one :db/doc "item content"}]
And also imagine that a certain group has millions of items.
Is there any efficient way to make queries such as:
- last item before or at ‘some-t’
- next item after ‘some-t’
Datomic has worked out so incredibly well for everything, I would hate this one small bit to make me move to another database.
Many thanks in advance for any suggestions!
Regards,
Mykola