Type Functions
Functions for working with the M type system.
- Type.AddTableKeyReturns a new table type with an additional key definition added.
- Type.ClosedRecordReturns a closed version of a record type, disallowing fields beyond those declared in the type.
- Type.FacetsReturns a record containing the facets (type constraints) of a type, such as precision and scale for decimal types.
- Type.ForFunctionCreates a function type from a signature record and minimum parameter count.
- Type.ForRecordConstructs a record type from a record of field type descriptors.
- Type.FunctionParametersReturns a record of parameter types for a given function type.
- Type.FunctionRequiredParametersReturns the minimum number of required parameters for a function type.
- Type.FunctionReturnReturns the return type declared for a given function type.
- Type.IsChecks whether a type is compatible with (a subtype of) another type.
- Type.IsNullableReturns true if the given type is a nullable type — one that can hold null values.
- Type.IsOpenRecordReturns true if the given record type is open — meaning it allows fields beyond those declared in the type.
- Type.ListItemReturns the item type of a list type.
- Type.NonNullableReturns the non-nullable version of a type, stripping the nullable wrapper if present.
- Type.OpenRecordReturns an open version of a record type, allowing values to have additional fields beyond those declared.
- Type.RecordFieldsReturns a record describing the fields of a record type, where each field value is a record with Type and Optional sub-fields.
- Type.ReplaceFacetsReturns a new type with the specified facets replaced, allowing customization of type constraints such as precision and scale.
- Type.ReplaceTableKeysReturns a table type with all key definitions replaced by the provided list of key records.
- Type.ReplaceTablePartitionKeyReturns a new table type with the partition key replaced by the specified partition key.
- Type.TableColumnReturns the type of a specific column in a table type.
- Type.TableKeysReturns the list of key definitions for a table type.
- Type.TablePartitionKeyReturns the partition key for the given table type, if one is defined.
- Type.TableRowReturns the row type of a table type.
- Type.TableSchemaReturns a table describing the columns of a table type, including column names, positions, type names, and kinds.
- Type.UnionReturns the union of a list of types — the most general type that is compatible with all types in the list.