This Document contains information on how to implement reverse indexes and range scans in lambdaroyal-memory.
reverse index lookup and reverse range scans traverse the data from the key with the highest rank to the lowests. rank here refers to the pos of a document key within a sorting index|index set. So for monotonic (strictly goes here naturally since a key is unique) increasing numeric keys the newest document has the highest rank whereas the oldest document has the lowest rank.
(require '[lambdaroyal.memory.core.tx :refer :all])
(select tx :stock-order :reverse)
(require '[lambdaroyal.memory.core.tx :refer :all])
(select tx :stock-order [:ident] = ["gaga"])
(require '[lambdaroyal.memory.core.tx :refer :all])
(select tx :stock-order :ident = "gaga")
(select tx :stock-order :ident >= "gaga")
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close