import * as elements from '@yellicode/elements'; import { Database, Column } from '../relational/model/database'; import { SqlServerDatabase, SqlServerTable, SqlServerColumn } from './model/sql-server-database'; import { Logger } from '@yellicode/core'; import { DbBuilder } from '../relational/db-builder'; import { SqlServerDbOptions } from './sql-server-db-options'; import { StoredProcedureBuilder } from './stored-procedure-builder'; import { TypeAssociationInfo } from '../relational/model/type-association-info'; export declare class SqlServerDbBuilder extends DbBuilder { private sqlServerObjectNameProvider; private sqlServerColumnSpecProvider; private simpleTableTypes; private tableTypeSelectors; private storedProceduresMap; /** * The sql type name of the identity. We only need this to correctly generate a * table type that we can use to pass a list of ids. */ private identityType; constructor(options?: SqlServerDbOptions, logger?: Logger); /** * OBSOLETE Adds a single-column table type, of which the column type matches the specified data type. * @param type A data type that can be directly mapped to a sql type. * @param options The table options. */ addSimpleTableType(type: elements.Type): this; addTableTypes(selector: (type: elements.Type) => boolean): this; protected addProdecures(kind: string, selector?: (type: elements.Type, table: SqlServerTable) => boolean): this; /** * Causes the creation of a "insert" stored procedure for each table. A selector expression can be provided to * limit the types/tables to create the procedure for. Calling this function multiple times with different selectors * will expand the selection. * @param selector A selector to filter out the tables for which to create the stored procedure. Leave empty * to create the stored procedure for each table. */ addProceduresForInsert(selector?: (type: elements.Type, table: SqlServerTable) => boolean): this; /** * Causes the creation of a "update" stored procedure for each table. A selector expression can be provided to * limit the types/tables to create the procedure for. Calling this function multiple times with different selectors * will expand the selection. * @param selector A selector to filter out the tables for which to create the stored procedure. Leave empty * to create the stored procedure for each table. */ addProceduresForUpdateById(selector?: (type: elements.Type, table: SqlServerTable) => boolean): this; /** * Causes the creation of a "select by id" stored procedure for each table. A selector expression can be provided to * limit the types/tables to create the procedure for. Calling this function multiple times with different selectors * will expand the selection. * @param selector A selector to filter out the tables for which to create the stored procedure. Leave empty * to create the stored procedure for each table. */ addProceduresForSelectById(selector?: (type: elements.Type, table: SqlServerTable) => boolean): this; /** * Causes the creation of a "delete by id" stored procedure for each table. A selector expression can be provided to * limit the types/tables to create the procedure for. Calling this function multiple times with different selectors * will expand the selection. * @param selector A selector to filter out the tables for which to create the stored procedure. Leave empty * to create the stored procedure for each table. */ addProceduresForDeleteById(selector?: (type: elements.Type, table: SqlServerTable) => boolean): this; protected createDatabase(db: Database, model: elements.Model, associationMap: Map): SqlServerDatabase; protected createColumn(column: Column, property: elements.Property): SqlServerColumn; private buildProcedures; protected buildAndAddProcedure(kind: string, table: SqlServerTable, type: elements.Type, builder: StoredProcedureBuilder): void; private createSimpleTableType; private createComplexTableType; private createTableTypes; private createKeys; private createForeignKey; private createPrimaryKey; private static shouldCreateProcedureForType; private shouldCreateTableTypeForType; }