import type { ColumnBuilderBaseConfig, ColumnDataType, HasDefault, IsPrimaryKey, MakeColumnConfig, NotNull } from "../../column-builder.cjs"; import type { ColumnBaseConfig } from "../../column.cjs"; import { entityKind } from "../../entity.cjs"; import type { OnConflict } from "../utils.cjs"; import { type Equal, type Or } from "../../utils.cjs"; import type { AnySQLiteTable } from "../table.cjs"; import { SQLiteColumn, SQLiteColumnBuilder } from "./common.cjs"; export interface PrimaryKeyConfig { autoIncrement?: boolean; onConflict?: OnConflict; } export declare abstract class SQLiteBaseIntegerBuilder, TRuntimeConfig extends object = object> extends SQLiteColumnBuilder { static readonly [entityKind]: string; constructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']); primaryKey(config?: PrimaryKeyConfig): IsPrimaryKey>>; } export declare abstract class SQLiteBaseInteger, TRuntimeConfig extends object = object> extends SQLiteColumn { static readonly [entityKind]: string; readonly autoIncrement: boolean; getSQLType(): string; } export type SQLiteIntegerBuilderInitial = SQLiteIntegerBuilder<{ name: TName; dataType: 'number'; columnType: 'SQLiteInteger'; data: number; driverParam: number; enumValues: undefined; }>; export declare class SQLiteIntegerBuilder> extends SQLiteBaseIntegerBuilder { static readonly [entityKind]: string; constructor(name: T['name']); build(table: AnySQLiteTable<{ name: TTableName; }>): SQLiteInteger>; } export declare class SQLiteInteger> extends SQLiteBaseInteger { static readonly [entityKind]: string; } export type SQLiteTimestampBuilderInitial = SQLiteTimestampBuilder<{ name: TName; dataType: 'date'; columnType: 'SQLiteTimestamp'; data: Date; driverParam: number; enumValues: undefined; }>; export declare class SQLiteTimestampBuilder> extends SQLiteBaseIntegerBuilder { static readonly [entityKind]: string; constructor(name: T['name'], mode: 'timestamp' | 'timestamp_ms'); /** * @deprecated Use `default()` with your own expression instead. * * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds. */ defaultNow(): HasDefault; build(table: AnySQLiteTable<{ name: TTableName; }>): SQLiteTimestamp>; } export declare class SQLiteTimestamp> extends SQLiteBaseInteger { static readonly [entityKind]: string; readonly mode: 'timestamp' | 'timestamp_ms'; mapFromDriverValue(value: number): Date; mapToDriverValue(value: Date): number; } export type SQLiteBooleanBuilderInitial = SQLiteBooleanBuilder<{ name: TName; dataType: 'boolean'; columnType: 'SQLiteBoolean'; data: boolean; driverParam: number; enumValues: undefined; }>; export declare class SQLiteBooleanBuilder> extends SQLiteBaseIntegerBuilder { static readonly [entityKind]: string; constructor(name: T['name'], mode: 'boolean'); build(table: AnySQLiteTable<{ name: TTableName; }>): SQLiteBoolean>; } export declare class SQLiteBoolean> extends SQLiteBaseInteger { static readonly [entityKind]: string; readonly mode: 'boolean'; mapFromDriverValue(value: number): boolean; mapToDriverValue(value: boolean): number; } export interface IntegerConfig { mode: TMode; } export declare function integer(): SQLiteIntegerBuilderInitial<''>; export declare function integer(config?: IntegerConfig): Or, Equal> extends true ? SQLiteTimestampBuilderInitial<''> : Equal extends true ? SQLiteBooleanBuilderInitial<''> : SQLiteIntegerBuilderInitial<''>; export declare function integer(name: TName, config?: IntegerConfig): Or, Equal> extends true ? SQLiteTimestampBuilderInitial : Equal extends true ? SQLiteBooleanBuilderInitial : SQLiteIntegerBuilderInitial; export declare const int: typeof integer;