merkle-db.tablet

Functions for working with tablet data.

first-key

(first-key tablet)

Return the first record key present in the tablet.

from-records

(from-records records)

Constructs a new tablet node. Does not ensure that the records are sorted.

join

(join left right)

Join two tablets into a single tablet. The tablets key ranges must not overlap.

keys

(keys tablet)

Return a sequence of the keys in the tablet.

last-key

(last-key tablet)

Return the last record key present in the tablet.

nth-key

(nth-key tablet n)

Return the nth key present in the tablet data.

prune

(prune tablet)

Update a tablet by removing empty records from the data.

read-all

(read-all tablet)

Read a sequence of key/map tuples which contain the field data for all the records in the tablet.

read-batch

(read-batch tablet record-keys)

Read a lazy sequence of key/map tuples which contain the field data for the records whose keys are in the given collection.

read-range

(read-range tablet min-key max-key)

Read a lazy sequence of key/map tuples which contain the field data for the records whose keys lie in the given range, inclusive. A nil boundary includes all records in that range direction.