tspace-mysql
Version:
Tspace MySQL is a promise-based ORM for Node.js, designed with modern TypeScript and providing type safety for schema databases.
145 lines (144 loc) • 4.37 kB
TypeScript
import { QueryBuilder } from "..";
import { Blueprint } from "../../Blueprint";
import { StateManager } from "../../StateManager";
export declare class SqliteQueryBuilder extends QueryBuilder {
constructor(state: StateManager);
select: () => string;
insert(): string;
update(): string;
remove(): string;
any(): string;
getColumns({ database, table }: {
database: string;
table: string;
}): string;
getSchema({ database, table }: {
database: string;
table: string;
}): string;
getTables(database: string): string;
hasTable({ database, table }: {
database: string;
table: string;
}): string;
createDatabase(database: string): string;
createTable({ database, table, schema, }: {
database: string;
table: string;
schema: Record<string, Blueprint> | string[];
}): string;
addColumn({ table, column, type, attributes, after, }: {
table: string;
column: string;
type: string;
attributes: string[];
after: string;
}): string;
changeColumn({ table, column, type, attributes, }: {
table: string;
column: string;
type: string;
attributes: string[];
}): string;
getChildFKs({ database, table }: {
database: string;
table: string;
}): string;
getFKs({ database, table }: {
database: string;
table: string;
}): string;
hasFK({ database, table, constraint, }: {
database: string;
table: string;
constraint: string;
}): string;
addFK({ table, tableRef, key, constraint, foreign, }: {
table: string;
tableRef: string;
key: string;
constraint: string;
foreign: {
references: string;
onDelete: string;
onUpdate: string;
};
}): string;
dropFK({ table, constraint, }: {
table: string;
constraint: string;
}): string;
getIndexes({ database, table }: {
database: string;
table: string;
}): string;
hasIndex({ database, table, name, }: {
database: string;
table: string;
name: string;
}): string;
addIndex({ table, name, columns, }: {
table: string;
name: string;
columns: string[];
}): string;
dropIndex({ table, name, }: {
table: string;
name: string;
}): string;
hasUnique({ database, table, name, }: {
database: string;
table: string;
name: string;
}): string;
addUnique({ table, name, columns }: {
table: string;
name: string;
columns: string[];
}): string;
dropUnique({ table, name, }: {
table: string;
name: string;
}): string;
hasPrimaryKey({ database, table, }: {
database: string;
table: string;
}): string;
addPrimaryKey({ table, columns, }: {
table: string;
columns: string[];
}): string;
dropPrimaryKey({ table }: {
table: string;
}): string;
getDatabase(database: string): string;
dropDatabase(database: string): string;
dropView(view: string): string;
dropTable(table: string): string;
truncate(table: string): string;
sleep(second: number): string;
format(sql: (string | null)[] | string): string;
getActiveConnections(): string;
getMaxConnections(): string;
protected bindJoin(values: string[]): string | null;
protected bindWhere(values: any[]): string | null;
protected bindOrderBy(values: string[]): string | null;
protected bindGroupBy(values: string[]): string | null;
protected bindSelect(values: string[], { distinct }?: {
distinct?: string;
}): string;
protected bindFrom({ from, alias, rawAlias, }: {
from: string[];
alias: string | null;
rawAlias: string | null;
}): string;
protected bindLimit(limit: string | number | null): string;
protected bindOffset(offset: string | number | null): string;
protected bindHaving(having: string | null): string;
protected bindRowLevelLock(rowLevelLock: {
mode: "FOR_UPDATE" | "FOR_SHARE" | null;
skipLocked: boolean | null;
nowait: boolean | null;
}): string;
private _formatedTypeAndAttributes;
}