File size: 1,264 Bytes
6491ad4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { entityKind } from "../entity.js";
import type { SQL } from "../sql/sql.js";
import type { SQLiteColumn } from "./columns/index.js";
import type { SQLiteTable } from "./table.js";
export interface IndexConfig {
    name: string;
    columns: IndexColumn[];
    unique: boolean;
    where: SQL | undefined;
}
export type IndexColumn = SQLiteColumn | SQL;
export declare class IndexBuilderOn {
    private name;
    private unique;
    static readonly [entityKind]: string;
    constructor(name: string, unique: boolean);
    on(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder;
}
export declare class IndexBuilder {
    static readonly [entityKind]: string;
    _: {
        brand: 'SQLiteIndexBuilder';
    };
    constructor(name: string, columns: IndexColumn[], unique: boolean);
    /**
     * Condition for partial index.
     */
    where(condition: SQL): this;
}
export declare class Index {
    static readonly [entityKind]: string;
    _: {
        brand: 'SQLiteIndex';
    };
    readonly config: IndexConfig & {
        table: SQLiteTable;
    };
    constructor(config: IndexConfig, table: SQLiteTable);
}
export declare function index(name: string): IndexBuilderOn;
export declare function uniqueIndex(name: string): IndexBuilderOn;