No matching definitions.

frame/schema

src/frame/schema.tur
defn

field

(field [name :cstr type :int nullable :int] :int)

construct a schema field.

name:cstr column name (copied internally)
type:int type tag from frame/type
nullable:int, 0 = no, 1 = yes

:int opaque field handle.

(field "age" (type-int32) 1)

Since: FR0

defn

field-name

(field-name [f :int] :cstr)

field name. Since: FR0

defn

field-type

(field-type [f :int] :int)

field type tag. Since: FR0

defn

field-nullable

(field-nullable [f :int] :int)

0 or 1. Since: FR0

defn

schema

(schema [fields :int] :int)

construct a schema from a cons list of field handles.

fieldscons list of :int field handles (ownership transferred)

:int opaque schema handle. Free with schema-free.

(schema (cons (field "x" (type-int32) 0) (cons (field "y" (type-float64) 0) 0)))

Since: FR0

defn

schema-arity

(schema-arity [s :int] :int)

number of fields. Since: FR0

defn

schema-field-at

(schema-field-at [s :int i :int] :int)

field handle at index i (0-based). Returns 0 if out of range.

Since: FR0

defn

schema-fields

(schema-fields [s :int] :int)

a cons list of field handles (newly allocated cells).

Since: FR0

defn

schema-names

(schema-names [s :int] :int)

a cons list of :cstr column names (the cstrs point into field storage).

Since: FR0

defn

schema-types

(schema-types [s :int] :int)

a cons list of :int type tags. Since: FR0

defn

schema-index-of

(schema-index-of [s :int name :cstr] :int)

index of the named field, or -1 if not found. Since: FR0

defn

schema-free

(schema-free [s :int] :void)

free a schema, every owned field, and every field name.

Since: FR0