Type

interface Type<T, N extends boolean, E> {
    type: string;  // "BOOLEAN" | "DATETIME" | "FLOAT" | "INT" | "INT8" | "JSON" | "NONE" | "NUMBER" | "VARCHAR"
    // ... internal fields
}

Defines a type for a field at database level. It is the return value of type functions.

type function

A type function is a method on the Sedentary instance (e.g. db.Int(), db.VarChar({ size: 255 })) that returns a Type. Each function corresponds to a data types at the database level.

See also

Type functions — Full list of type functions (Boolean, DateTime, FKey, Float, Int, Int8, JSON, None, Number, VarChar) in the Sedentary class documentation.

data types

The database types supported: BOOLEAN, DATETIME, FLOAT (4 or 8 bytes), INT (2 or 4 bytes), INT8, JSON, NONE (virtual), NUMBER (arbitrary precision), VARCHAR.