Skip to main content

Module data_type

Module data_type 

Source
Expand description

The type of a column in a data contract.

DataType is the in-memory form. TypeLock and FieldLock are its on-disk form, shared by types.lock and the build artifact, and are the only place the tag vocabulary (array, list, map, record) is defined.

Structsยง

FieldLock ๐Ÿ”’
On-disk form of a RecordField: a TypeLock widened with the fieldโ€™s name and nullability.
RecordField
One field of a DataType::Record.
TypeLock ๐Ÿ”’
On-disk form of a DataType: the typeโ€™s name, plus the structural payload the SQL grammar cannot spell.

Enumsยง

DataType
A columnโ€™s type, described structurally.
DataTypeJsonError ๐Ÿ”’
A stored type that could not be read back.
TypeLockError
A structural payload that does not belong on the type it was recorded with.

Constantsยง

ARRAY_TAG ๐Ÿ”’
On-disk tag for DataType::Array.
LIST_TAG ๐Ÿ”’
On-disk tag for DataType::List.
MAP_TAG ๐Ÿ”’
On-disk tag for DataType::Map.
RECORD_TAG ๐Ÿ”’
On-disk tag for DataType::Record.

Functionsยง

join_data_type ๐Ÿ”’
Rebuild a type from the three on-disk keys, rejecting a payload that does not belong on the named tag.
split_data_type ๐Ÿ”’
Decompose a type into the three keys the on-disk form carries.