UNPKG

874 BTypeScriptView Raw
1/**
2 * Autogenerated, do not modify
3 */
4import { IDatabaseColumn, IDatabaseSchema } from "./mysql-database-definition";
5export declare abstract class SchemaOperator {
6 protected definition: IDatabaseSchema;
7 /**
8 * Return a copy of the object without any primary keys
9 */
10 protected removePrimaryKeys<T>(tableName: string, data: T): T;
11 protected retainPrimaryKeys<T>(tableName: string, data: T): T;
12 protected getPkCols(tableName: string): IDatabaseColumn[];
13 /**
14 * return a new object where with only attributes that have
15 * a corresponding column for given table
16 * @param table
17 * @param data
18 */
19 protected stripNoneBelonging<T>(tableName: string, data: T): T;
20 /**
21 * List the names of all primary keys in a table
22 * @param tableName
23 */
24 protected getPrimaryKeyNames(tableName: string): string[];
25}