Liking cljdoc? Tell your friends :D

fluree.db.flake


->sidclj/s

(->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.
raw docstring

->sid-checkedclj/s

(->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.
raw docstring

cc-cmp-classclj/s

(cc-cmp-class x)

change-tclj/s

(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.
raw docstring

cmp-boolclj/s

(cmp-bool b1 b2)

cmp-flakes-blockclj/s

(cmp-flakes-block f1 f2)

cmp-flakes-historyclj/s

(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.
raw docstring

cmp-flakes-opstclj/s

(cmp-flakes-opst f1 f2)

cmp-flakes-opst-noveltyclj/s

(cmp-flakes-opst-novelty f1 f2)

cmp-flakes-postclj/s

(cmp-flakes-post f1 f2)

cmp-flakes-post-noveltyclj/s

(cmp-flakes-post-novelty f1 f2)

cmp-flakes-psotclj/s

(cmp-flakes-psot f1 f2)

cmp-flakes-psot-noveltyclj/s

(cmp-flakes-psot-novelty f1 f2)

cmp-flakes-spotclj/s

(cmp-flakes-spot f1 f2)

cmp-flakes-spot-noveltyclj/s

(cmp-flakes-spot-novelty f1 f2)

cmp-history-quick-reverse-sortclj/s

(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.
raw docstring

cmp-longclj/s

(cmp-long l1 l2)

cmp-metaclj/s

(cmp-meta m1 m2)

cmp-predclj/s

(cmp-pred p1 p2)

cmp-valclj/s

(cmp-val o1 o2)

cmp-val-xtypeclj/s

(cmp-val-xtype o1 o2)

combine-cmpclj/smacro

(combine-cmp & comps)

Flakecljs


Flake->partsclj/s

(Flake->parts flake)

flip-flakeclj/s

(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.
raw docstring

lookupclj/s

(lookup ss start-flake end-flake)

lshiftclj/s

(lshift n bits)

MAX-COLL-SUBJECTSclj/s


MAX-COLLECTION-IDclj/s


MAX-PREDICATE-IDclj/s


max-subject-idclj/s

(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.
raw docstring

MIN-PREDICATE-IDclj/s


min-subject-idclj/s

(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.
raw docstring

new-flakeclj/s

(new-flake & parts)

parts->Flakeclj/s

(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.
raw docstring

sid->cidclj/s

(sid->cid sid)

Will return a collection id from a subject-id.

Will return a collection id from a subject-id.
raw docstring

sid->iclj/s

(sid->i sid)

Returns the subject index from a subject-id.

Returns the subject index from a subject-id.
raw docstring

size-bytesclj/s

(size-bytes flakes)

Returns approx number of bytes in a collection of flakes.

Returns approx number of bytes in a collection of flakes.
raw docstring

size-flakeclj/s

(size-flake f)

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

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
raw docstring

size-kbclj/s

(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.
raw docstring

sliceclj/s

(slice ss from to)

From and to are Flakes

From and to are Flakes
raw docstring

sorted-set-byclj/s

(sorted-set-by comparator & flakes)

split-atclj/s

(split-at n ss)

split-by-flakeclj/s

(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.
raw docstring

subrangeclj/s

(subrange ss start-test start-flake end-test end-flake)

takeclj/s

(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.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close