(->sid cid n)
Converts a collection id and a number (n) into a subject-id.
Converts a collection id and a number (n) into a subject-id.
(->sid-checked cid n)
Like ->sid, but checks that cid and n are within allowable range.
Like ->sid, but checks that cid and n are within allowable range.
(cc-cmp-class x)
(change-t flake t)
Takes a flake and returns one with the provided block and .-op flipped from true/false. Don't over-ride no-history, even if no-history for this predicate has changed. New inserts will have the no-history flag, but we need the old inserts to be properly retracted in the txlog.
Takes a flake and returns one with the provided block and .-op flipped from true/false. Don't over-ride no-history, even if no-history for this predicate has changed. New inserts will have the no-history flag, but we need the old inserts to be properly retracted in the txlog.
(cmp-bool b1 b2)
(cmp-flakes-block f1 f2)
(cmp-flakes-history f1 f2)
Note this is not suitable for a set, only a vector/list.
Note this is not suitable for a set, only a vector/list.
(cmp-flakes-opst f1 f2)
(cmp-flakes-opst-novelty f1 f2)
(cmp-flakes-post f1 f2)
(cmp-flakes-post-novelty f1 f2)
(cmp-flakes-psot f1 f2)
(cmp-flakes-psot-novelty f1 f2)
(cmp-flakes-spot f1 f2)
(cmp-flakes-spot-novelty f1 f2)
(cmp-history-quick-reverse-sort f1 f2)
Sorts by transaction time in ascending order (newest first), then by the boolean operation descending so assertions (true) come before retractions (false) so that we can 're-play' the log in reverse order to come up with historical states. Suitable only for sorting a vector, not a sorted set.
Sorts by transaction time in ascending order (newest first), then by the boolean operation descending so assertions (true) come before retractions (false) so that we can 're-play' the log in reverse order to come up with historical states. Suitable only for sorting a vector, not a sorted set.
(cmp-long l1 l2)
(cmp-meta m1 m2)
(cmp-pred p1 p2)
(cmp-val o1 o2)
(cmp-val-xtype o1 o2)
(combine-cmp & comps)
(Flake->parts flake)
(flip-flake flake)
(flip-flake flake t)
Takes a flake and returns one with the provided block and .-op flipped from true/false. Don't over-ride no-history, even if no-history for this predicate has changed. New inserts will have the no-history flag, but we need the old inserts to be properly retracted in the txlog.
Takes a flake and returns one with the provided block and .-op flipped from true/false. Don't over-ride no-history, even if no-history for this predicate has changed. New inserts will have the no-history flag, but we need the old inserts to be properly retracted in the txlog.
(lookup ss start-flake end-flake)
(lshift n bits)
(max-subject-id cid)
For a given collection id, returns the max subject id that is allowed.
For a given collection id, returns the max subject id that is allowed.
(min-subject-id cid)
For a given collection id, returns the min subject id that is allowed.
For a given collection id, returns the min subject id that is allowed.
(new-flake & parts)
(parts->Flake [s p o t op m])
(parts->Flake [s p o t op m] default-tx)
(parts->Flake [s p o t op m] default-tx default-op)
Used primarily to generate flakes for comparator. If you wish to generate a flake for other purposes, be sure to supply all components.
Used primarily to generate flakes for comparator. If you wish to generate a flake for other purposes, be sure to supply all components.
(sid->cid sid)
Will return a collection id from a subject-id.
Will return a collection id from a subject-id.
(sid->i sid)
Returns the subject index from a subject-id.
Returns the subject index from a subject-id.
(size-bytes flakes)
Returns approx number of bytes in a collection of flakes.
Returns approx number of bytes in a collection of flakes.
(size-flake f)
Base size of a flake is 38 bytes... then add size for 'o' and 'm'. Flakes have the following:
Objects will be rounded up to nearest 8 bytes... we don't do this here as it should be 'close enough' reference: https://www.javamex.com/tutorials/memory/string_memory_usage.shtml
Base size of a flake is 38 bytes... then add size for 'o' and 'm'. Flakes have the following: - s - 8 bytes - p - 8 bytes - o - ?? - t - 8 bytes - add? - 1 byte - m - 1 byte + ?? - header - 12 bytes - object header... Objects will be rounded up to nearest 8 bytes... we don't do this here as it should be 'close enough' reference: https://www.javamex.com/tutorials/memory/string_memory_usage.shtml
(size-kb flakes)
Like size-bytes, but kb. Rounds down for simplicity, as bytes is just an estimate anyhow.
Like size-bytes, but kb. Rounds down for simplicity, as bytes is just an estimate anyhow.
(sorted-set-by comparator & flakes)
(split-at n ss)
(split-by-flake f ss)
Splits a sorted set at a given flake. If there is an exact match for flake, puts it in the left-side. Primarily for use with last-flake.
Splits a sorted set at a given flake. If there is an exact match for flake, puts it in the left-side. Primarily for use with last-flake.
(subrange ss start-test start-flake end-test end-flake)
(take n flake-set)
Takes n flakes from a sorted flake set, retaining the set itself.
Takes n flakes from a sorted flake set, retaining the set itself.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close