Skip to main content

Module row

Module row 

Source
Expand description

In-memory Tag-based encoding of a tuple of Datums.

See doc/developer/row-encoding.md for the size limits this encoding and its datum types impose.

ModulesΒ§

columnar πŸ”’
columnation πŸ”’
encode πŸ”’
A permanent storage encoding for rows.
iter
Defines a β€œlending iterator” for Row
proto_datum
Nested message and enum types in ProtoDatum.
sealed πŸ”’
stable_row_proto πŸ”’

MacrosΒ§

assert_consecutive πŸ”’
Assert that the listed tags are consecutive, in the order given.

StructsΒ§

DatumDictIter
DatumDictTypedIter
DatumList
A sequence of Datums
DatumListIter
DatumListTypedIter
DatumMap
A mapping from string keys to Datums
DatumNested
Represents a single Datum, appropriate to be nested inside other Datums.
ProtoArray
ProtoArrayDimension
ProtoDatum
ProtoDict
ProtoDictElement
ProtoNumeric
See [dec::to_packed_bcd] and http://speleotrove.com/decimal/dnpack.html for more information on this format.
ProtoRange
ProtoRangeInner
ProtoRow
Row
A packed representation for Datums.
RowArena
RowArena is used to hold on to temporary Rows for functions like eval that need to create complex Datums but don’t have a Row to put them in yet.
RowArenaBuf
A growable, writeable byte buffer that builds a value into a RowArena.
RowPacker
Packs datums into a Row.
RowRef
A contiguous slice of bytes that are row data.
SharedRow
A thread-local row, which can be borrowed and returned.
StableRow
A Row that serializes as protobuf-encoded ProtoRow bytes.

EnumsΒ§

ProtoDatumOther
Tag πŸ”’

ConstantsΒ§

LONG πŸ”’
SHORT πŸ”’
TINY πŸ”’

TraitsΒ§

FromDatum
Infallible conversion from a Datum to a typed value.

FunctionsΒ§

checked_timestamp_nanos πŸ”’
Returns an i64 representing a NaiveDateTime, if said i64 can be round-tripped back to a NaiveDateTime.
date_to_array πŸ”’
datum_list_size
Number of bytes required by a list of datums. This computes the size that would be required if the given datums were packed into a list.
datum_size
Number of bytes required by the datum. This is used to optimistically pre-allocate buffers for packing rows.
datums_size
Number of bytes required by a sequence of datums.
min_bytes_signed πŸ”’
min_bytes_unsigned πŸ”’
naive_date_to_arrays πŸ”’
payload_mask πŸ”’
Mask covering the low len bytes of a word.
push_date πŸ”’
push_datum πŸ”’
push_lengthed_bytes πŸ”’
push_naive_date πŸ”’
push_time πŸ”’
push_untagged_bytes πŸ”’
read_byte πŸ”’
read_byte_array πŸ”’
read_date πŸ”’
read_datum⚠
Read a datum starting at byte offset.
read_lengthed_bytes πŸ”’
Read a byte slice preceded by its length, the width of the length prefix given by the tag’s distance from first, its kind’s *Tiny tag.
read_naive_date πŸ”’
read_signed_varint πŸ”’
Read the payload of a variable-length integer of either sign, extended to N bytes.
read_time πŸ”’
read_unsigned_varint πŸ”’
Read the payload of an unsigned variable-length integer, zero-extended to N bytes.
read_untagged_bytes πŸ”’
Read a byte slice starting at byte offset.
read_varint_payload πŸ”’
Read a len byte payload and extend it to N bytes, with ones above it when negative.
read_varint_word πŸ”’
Read the len payload bytes of a variable-length integer, returning them in the low len * 8 bits of a word. Bits above that are zero or belong to whatever follows in the row, so a caller must mask them off.
read_varint_word_tail πŸ”’
The payload of a variable-length integer whose datum ends within eight bytes of the end of data, so the wide load in read_varint_word would run off the end.
row_size
Return the number of bytes these Datums would use if packed as a Row.
time_to_arrays πŸ”’
truncate πŸ”’
The low N bytes of word, little-endian.