Toshihiko
    Preparing search index...

    Interface FieldDefinition<Name, FieldTypeDefinition>

    A schema entry which retains its field name and Field Type.

    interface FieldDefinition<
        Name extends string = string,
        FieldTypeDefinition extends FieldTypeLike = FieldTypeLike,
    > {
        allowNull?: boolean;
        autoIncrement?: boolean;
        column?: string;
        defaultValue?: FieldTypeValue<FieldTypeDefinition>;
        name: Name;
        primaryKey?: boolean;
        type?: FieldTypeDefinition;
        validators?:
            | FieldValidator<FieldTypeValue<FieldTypeDefinition>>
            | readonly FieldValidator<FieldTypeValue<FieldTypeDefinition>>[];
    }

    Type Parameters

    • Name extends string = string
    • FieldTypeDefinition extends FieldTypeLike = FieldTypeLike

    Hierarchy (View Summary)

    Index
    allowNull?: boolean

    Whether the inferred application value includes null.

    autoIncrement?: boolean

    Whether the storage backend generates this field on insert.

    column?: string

    Storage column name; defaults to name.

    defaultValue?: FieldTypeValue<FieldTypeDefinition>

    Application value used when a newly built row omits this field.

    name: Name

    Literal logical property name retained for schema inference.

    primaryKey?: boolean

    Whether the field participates in primary-key lookup.

    Concrete Field Type retained for value inference.

    validators?:
        | FieldValidator<FieldTypeValue<FieldTypeDefinition>>
        | readonly FieldValidator<FieldTypeValue<FieldTypeDefinition>>[]

    Validators receiving the inferred application value.