import type { AnyCockroachTable } from "../table.js";
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { type Equal } from "../../utils.js";
import { CockroachColumn, CockroachColumnWithArrayBuilder } from "./common.js";
export type CockroachDecimalBuilderInitial<TName extends string> = CockroachDecimalBuilder<{
    name: TName;
    dataType: 'string';
    columnType: 'CockroachDecimal';
    data: string;
    driverParam: string;
    enumValues: undefined;
}>;
export declare class CockroachDecimalBuilder<T extends ColumnBuilderBaseConfig<'string', 'CockroachDecimal'>> extends CockroachColumnWithArrayBuilder<T, {
    precision: number | undefined;
    scale: number | undefined;
}> {
    static readonly [entityKind]: string;
    constructor(name: T['name'], precision?: number, scale?: number);
}
export declare class CockroachDecimal<T extends ColumnBaseConfig<'string', 'CockroachDecimal'>> extends CockroachColumn<T> {
    static readonly [entityKind]: string;
    readonly precision: number | undefined;
    readonly scale: number | undefined;
    constructor(table: AnyCockroachTable<{
        name: T['tableName'];
    }>, config: CockroachDecimalBuilder<T>['config']);
    mapFromDriverValue(value: unknown): string;
    getSQLType(): string;
}
export type CockroachDecimalNumberBuilderInitial<TName extends string> = CockroachDecimalNumberBuilder<{
    name: TName;
    dataType: 'number';
    columnType: 'CockroachDecimalNumber';
    data: number;
    driverParam: string;
    enumValues: undefined;
}>;
export declare class CockroachDecimalNumberBuilder<T extends ColumnBuilderBaseConfig<'number', 'CockroachDecimalNumber'>> extends CockroachColumnWithArrayBuilder<T, {
    precision: number | undefined;
    scale: number | undefined;
}> {
    static readonly [entityKind]: string;
    constructor(name: T['name'], precision?: number, scale?: number);
}
export declare class CockroachDecimalNumber<T extends ColumnBaseConfig<'number', 'CockroachDecimalNumber'>> extends CockroachColumn<T> {
    static readonly [entityKind]: string;
    readonly precision: number | undefined;
    readonly scale: number | undefined;
    constructor(table: AnyCockroachTable<{
        name: T['tableName'];
    }>, config: CockroachDecimalNumberBuilder<T>['config']);
    mapFromDriverValue(value: unknown): number;
    mapToDriverValue: StringConstructor;
    getSQLType(): string;
}
export type CockroachDecimalBigIntBuilderInitial<TName extends string> = CockroachDecimalBigIntBuilder<{
    name: TName;
    dataType: 'bigint';
    columnType: 'CockroachDecimalBigInt';
    data: bigint;
    driverParam: string;
    enumValues: undefined;
}>;
export declare class CockroachDecimalBigIntBuilder<T extends ColumnBuilderBaseConfig<'bigint', 'CockroachDecimalBigInt'>> extends CockroachColumnWithArrayBuilder<T, {
    precision: number | undefined;
    scale: number | undefined;
}> {
    static readonly [entityKind]: string;
    constructor(name: T['name'], precision?: number, scale?: number);
}
export declare class CockroachDecimalBigInt<T extends ColumnBaseConfig<'bigint', 'CockroachDecimalBigInt'>> extends CockroachColumn<T> {
    static readonly [entityKind]: string;
    readonly precision: number | undefined;
    readonly scale: number | undefined;
    constructor(table: AnyCockroachTable<{
        name: T['tableName'];
    }>, config: CockroachDecimalBigIntBuilder<T>['config']);
    mapFromDriverValue: BigIntConstructor;
    mapToDriverValue: StringConstructor;
    getSQLType(): string;
}
export type CockroachDecimalConfig<T extends 'string' | 'number' | 'bigint' = 'string' | 'number' | 'bigint'> = {
    precision: number;
    scale?: number;
    mode?: T;
} | {
    precision?: number;
    scale: number;
    mode?: T;
} | {
    precision?: number;
    scale?: number;
    mode: T;
};
export declare function decimal<TMode extends 'string' | 'number' | 'bigint'>(config?: CockroachDecimalConfig<TMode>): Equal<TMode, 'number'> extends true ? CockroachDecimalNumberBuilderInitial<''> : Equal<TMode, 'bigint'> extends true ? CockroachDecimalBigIntBuilderInitial<''> : CockroachDecimalBuilderInitial<''>;
export declare function decimal<TName extends string, TMode extends 'string' | 'number' | 'bigint'>(name: TName, config?: CockroachDecimalConfig<TMode>): Equal<TMode, 'number'> extends true ? CockroachDecimalNumberBuilderInitial<TName> : Equal<TMode, 'bigint'> extends true ? CockroachDecimalBigIntBuilderInitial<TName> : CockroachDecimalBuilderInitial<TName>;
export declare const numeric: typeof decimal;
