struct
C0::Record
- C0::Record
- Struct
- Value
- Object
Overview
Zero-copy accessor for a single record within a table. Fields are accessed by index, returning slices into the original buffer.
Defined in:
c0/table.crConstructors
Instance Method Summary
-
#field(n : Int32) : Bytes
Access field by index.
-
#field_count : Int32
Number of fields in this record.
-
#fields : Array(Bytes)
All fields as slices.
-
#raw : Bytes
Raw bytes of the entire record.
-
#value(n : Int32) : Bytes
Logical bytes of field n: the raw slice with DLE escapes decoded.
-
#values : Array(Bytes)
All logical field values.
Constructor Detail
Instance Method Detail
def field(n : Int32) : Bytes
#
Access field by index. Scans for the Nth US separator. Respects STX/ETX nesting — US inside nested scopes is not a boundary.
def field_count : Int32
#
Number of fields in this record. Respects STX/ETX nesting — US inside nested scopes is not counted.
def value(n : Int32) : Bytes
#
Logical bytes of field n: the raw slice with DLE escapes decoded. Zero-copy when the field contains no escapes.