github ↗
docs menu

Module Talon.Record

Record cells.

A record cell is the value of one row of a record column (Type.record): named fields in order, each holding a value or null. Record columns read as t through kind.

#type t

The type for record cells. A record cell's field names are distinct.

#val kind : t Kind.t

kind reads record columns of every field list.

#val empty : t

empty is the record cell with no fields.

#val add : 'a Kind.t -> string -> 'a option -> t -> t

add k name v r is r with a last field name of kind k holding v, or null if v is None.

Raises Invalid_argument if r has a field name, if name is not valid UTF-8, or if k is or contains the extension kind.

#val field : 'a Kind.t -> string -> t -> 'a option

field k name r is the field name of r read as k: Some v if it holds v, and None if it is null.

Raises Invalid_argument if r has no field name, or if k does not read it: a field whose type is or contains an extension, or a field of another kind.

#val names : t -> string list

names r is the names of r's fields, in order.