Data types
Declared scalar, temporal, text, composite, and vector types.
Type names are case-insensitive and ignore spaces, underscores, and hyphens
during registry lookup. For example, LowCardinality and
low_cardinality resolve to the same wrapper. Use the canonical display
spellings in maintained DDL.
Numeric
| Family | Types |
|---|---|
| Unsigned integers | UInt8, UInt16, UInt32, UInt64, UInt128, UInt256 |
| Signed integers | Int8, Int16, Int32, Int64, Int128, Int256 |
| Floating point | Float32, Float64 |
| Decimal | Decimal(P, S), plus width-specific Decimal32(S) through Decimal256(S) |
Decimal(P, S) accepts precision 1 through 76 and scale 0 through precision.
The registry selects the smallest decimal width that can represent the declared
precision.
Use decimals or integer minor units for exact business values. Floating-point values are approximate.
Temporal
| Type | Purpose |
|---|---|
Date / Date32 | Calendar dates |
DateTime | Date and time |
DateTime64(p[, 'TZ']) | Fractional time with precision 0 through 9 and optional time-zone name |
Timestamp | Timestamp value |
Duration | Duration ticks |
Normalize application time zones and precision explicitly. An optional time zone in a type is part of the type descriptor, not a substitute for a system clock policy.
Text and identifiers
StringFixedString(N), with byte length 1 through 1,048,576BytesUUIDIPv4andIPv6JSONBool
Text aliases include VARCHAR, TEXT, and CHAR. Common integer aliases
include INT, INTEGER, and BIGINT.
Composite and wrappers
Array(UInt64)
Tuple(String, UInt64)
Map(String, String)
Nullable(Decimal(20, 8))
LowCardinality(String)Nullable(T) adds nullability. LowCardinality(T) is a storage/type hint;
its current execution semantics are those of the wrapped value.
The registry also declares Object, Variant, and Dynamic. Operator,
index, codec, and wire support is not uniform across every declared composite
type. Validate the complete create/insert/query/driver path for a complex type
before putting it into a stable schema.
Vectors
Vector(N) is a fixed-dimensional dense numeric vector. The default element
type is Float32; Float64 can be declared as the optional element type:
embedding Vector(768)
precise_embedding Vector(128, Float64)Dimensions range from 1 through 65,535. The current HNSW index path is limited
to a bare Float32 vector column. See
Vector search.
Conversion
NYXDB applies lossless widening where the type registry permits it. Narrowing, string-to-number conversion, floating-point-to-integer conversion, and removing nullability require an explicit cast:
SELECT cast(raw_amount, 'UInt64')
FROM imported_rows;Prefer explicit casts at ingestion boundaries so failures are attributable and schema evolution remains reviewable.