moon/fory Apache Fory · MoonBit

API · struct

Row

Row format · defined at row.mbt:730

pub(all) struct Row {
  schema : RowSchema
  values : Array[RowValue?]
}

A builder for one row. Create it from a schema, set each field in any order, then call finish to get the row's bytes.

Fields

FieldMeaning
schema : RowSchema

The schema this row is being built against.

values : Array[RowValue?]

One entry per field, in schema order. None is a field never set, which is what finish writes as null.

Methods

finish

fn Row::finish(Self) -> Bytes raise

Serialise the row. A field left unset is written as null.

new

fn Row::new(RowSchema) -> Self

Start a row against schema. Every field begins null until set.

set

fn Row::set(Self, Int32, RowValue) -> Unit raise

Place v in field i. The value must fit the field's type, or the call refuses.

Generated from src/pkg.generated.mbti and the doc comments beside this declaration.