UNPKG

@rnaga/wp-node

Version:

👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**

21 lines • 891 B
import { Knex } from "knex"; import { Config } from "../config"; import { Tables } from "../core/tables"; import Database from "../database"; import type * as types from "../types"; export declare class SchemaBuilder { private database; private config; tables: Tables; static schema: Record<types.TableNames, types.Schema<types.TableNames>>; constructor(database: Database, config: Config, tables: Tables); private getDefinition; static add(schema: Record<types.TableNames, types.Schema<types.TableNames>>): void; private tableExists; private getColumnNamesFromExistingTable; private getColumnNamesFromSchemaDefinition; private buildColumns; get<T extends types.TableNames>(tableName: T): Promise<(Knex.SchemaBuilder | Knex.Raw<any>)[]>; drop(tableName: types.TableNames): Knex.SchemaBuilder; } //# sourceMappingURL=schema-builder.d.ts.map