CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
indexes.d.cts42 linesDownload Raw Back to sqlite-core
1import { entityKind } from "../entity.cjs";2import type { SQL } from "../sql/sql.cjs";3import type { SQLiteColumn } from "./columns/index.cjs";4import type { SQLiteTable } from "./table.cjs";5export interface IndexConfig {6    name: string;7    columns: IndexColumn[];8    unique: boolean;9    where: SQL | undefined;10}11export type IndexColumn = SQLiteColumn | SQL;12export declare class IndexBuilderOn {13    private name;14    private unique;15    static readonly [entityKind]: string;16    constructor(name: string, unique: boolean);17    on(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder;18}19export declare class IndexBuilder {20    static readonly [entityKind]: string;21    _: {22        brand: 'SQLiteIndexBuilder';23    };24    constructor(name: string, columns: IndexColumn[], unique: boolean);25    /**26     * Condition for partial index.27     */28    where(condition: SQL): this;29}30export declare class Index {31    static readonly [entityKind]: string;32    _: {33        brand: 'SQLiteIndex';34    };35    readonly config: IndexConfig & {36        table: SQLiteTable;37    };38    constructor(config: IndexConfig, table: SQLiteTable);39}40export declare function index(name: string): IndexBuilderOn;41export declare function uniqueIndex(name: string): IndexBuilderOn;42