Documentation
    Preparing search index...

    Class SQLiteNumericBuilder<T>

    Type Parameters

    • T extends ColumnBuilderBaseConfig<"string", "SQLiteNumeric">

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _: {
        brand: "ColumnBuilder";
        columnType: T["columnType"];
        data: T["data"];
        dataType: T["dataType"];
        dialect: "sqlite";
        driverParam: T["driverParam"];
        enumValues: T["enumValues"];
        generated: T extends { generated: G }
            ? G extends undefined ? unknown : G
            : unknown;
        hasDefault: T extends { hasDefault: U } ? U : boolean;
        identity: T extends { identity: U } ? U : unknown;
        name: T["name"];
        notNull: T extends { notNull: U } ? U : boolean;
    }
    $default: (
        fn: () => SQL<unknown> | T["data"],
    ) => HasRuntimeDefault<HasDefault<SQLiteNumericBuilder<T>>>

    Alias for $defaultFn.

    $onUpdate: (
        fn: () => SQL<unknown> | T["data"],
    ) => HasDefault<SQLiteNumericBuilder<T>>

    Alias for $onUpdateFn.

    config: ColumnBuilderRuntimeConfig<T["data"], object>
    "[entityKind]": string

    Methods

    • Adds a dynamic default value to the column. The function will be called when the row is inserted, and the returned value will be used as the column value.

      Note: This value does not affect the drizzle-kit behavior, it is only used at runtime in drizzle-orm.

      Parameters

      • fn: () => SQL<unknown> | T["data"]

      Returns HasRuntimeDefault<HasDefault<SQLiteNumericBuilder<T>>>

    • Adds a dynamic update value to the column. The function will be called when the row is updated, and the returned value will be used as the column value if none is provided. If no default (or $defaultFn) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.

      Note: This value does not affect the drizzle-kit behavior, it is only used at runtime in drizzle-orm.

      Parameters

      • fn: () => SQL<unknown> | T["data"]

      Returns HasDefault<SQLiteNumericBuilder<T>>