struct C0::Table

Overview

Zero-copy accessor for a tabular C0DATA group.

Scans the buffer once to index record positions, then provides O(1) access to records and fields as slices into the original buffer.

Defined in:

c0/table.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(buf : Bytes, offset : Int32 = 0) #

[View source]

Instance Method Detail

def each_record(& : Record -> ) : Nil #

Iterate all records.


[View source]
def header(i : Int32) : Bytes #

Header field name by index.


[View source]
def header_count : Int32 #

Number of header fields.


[View source]
def headers : Array(Bytes) #

All header names.


[View source]
def name : Bytes #

Group/table name as a slice into the buffer.


[View source]
def record(i : Int32) : Record #

Access a record by index. Returns a Record accessor.


[View source]
def record_count : Int32 #

Number of records.


[View source]