Broadcaster used on this query runner to broadcast entity events.
Connection used by this query runner.
Stores temporarily user data. Useful for sharing data with subscribers.
Real database connection from a connection pool used to perform queries.
Database driver used by connection.
Indicates if connection for this query runner is released. Once its released, query runner cannot run queries anymore.
Indicates if transaction is in progress.
All synchronized tables in the database.
Entity manager working only with current query runner.
Mode in which query runner executes. Used for replication. If replication is not setup its value is ignored.
Last executed query in a transaction. This is needed because in transaction mode mssql cannot execute parallel queries, that's why we store last executed query promise to wait it when we execute next query.
Sql-s stored if "sql in memory" mode is enabled.
Indicates if special query runner mode in which sql queries won't be executed is enabled.
Creates a new column from the column in the table.
Creates a new columns from the column in the table.
Builds a query for create column.
Concat database name and schema name to the foreign key name. Needs because FK name is relevant to the schema and database.
Changes a column in the table.
Changes a column in the table.
Removes all tables from the currently connected database.
Flushes all memorized sqls.
Clears all table contents. Note: this operation uses SQL's TRUNCATE query which cannot be reverted in transactions.
Commits transaction. Error will be thrown if transaction was not started.
Creates/uses database connection from the connection pool to perform further operations. Returns obtained database connection.
Converts string literal of isolation level to enum. The underlying mssql driver requires an enum for the isolation level.
Creates a new check constraint.
Builds create check constraint sql.
Creates a new check constraints.
Creates a new database.
Creates a new foreign key.
Builds create foreign key sql.
Creates a new foreign keys.
Creates a new index.
Builds create index sql.
Creates a new indices
Creates a new primary key.
Builds create primary key sql.
Creates table schema. If database name also specified (e.g. 'dbName.schemaName') schema will be created in specified database.
Creates a new table.
Builds and returns SQL for create table.
Creates a new unique constraint.
Builds create unique constraint sql.
Creates a new unique constraints.
Disables special query runner mode in which sql queries won't be executed started by calling enableSqlMemory() method.
Previously memorized sql will be flushed.
Drops check constraint.
Builds drop check constraint sql.
Drops check constraints.
Drops column in the table.
Drops the columns in the table.
Drops database.
Drops a foreign key from the table.
Builds drop foreign key sql.
Drops a foreign keys from the table.
Drops an index.
Builds drop index sql.
Drops an indices from the table.
Drops a primary key.
Builds drop primary key sql.
Drops table schema. If database name also specified (e.g. 'dbName.schemaName') schema will be dropped in specified database.
Drops the table.
Builds drop table sql.
Drops unique constraint.
Builds drop unique constraint sql.
Drops an unique constraints.
Enables special query runner mode in which sql queries won't be executed, instead they will be memorized into a special variable inside query runner. You can get memorized sql using getMemorySql() method.
Escapes given table name.
Executes down sql queries.
Executes up sql queries.
Executes sql used special for schema build.
Gets table from previously loaded tables, otherwise loads it from database.
Return current database.
Return current schema.
Returns all available database names including system databases.
Gets sql stored in the memory. Parameters in the sql are already replaced.
Returns all available schema names including system schemas. If database parameter specified, returns schemas of that database.
Loads given table's data from the database.
Loads all tables (with given names) from the database.
Checks if column exist in the table.
Checks if database with the given name exist.
Checks if schema with the given name exist.
Checks if table with the given name exist in the database.
Checks if at least one of column properties was changed. Does not checks column type, length and autoincrement, because these properties changes separately.
Checks if column length is by default.
Checks if column precision is by default.
Checks if column scale is by default.
Checks if column display width is by default. Used only for MySQL.
Loads all tables (with given names) from the database and creates a Table from them.
Converts MssqlParameter into real mssql parameter type.
Executes a given SQL query.
Releases used database connection. You cannot use query runner methods once its released.
Removes parenthesis around default value. Sql server returns default value with parenthesis around, e.g. ('My text') - for string ((1)) - for number (newsequentialId()) - for function
Renames column in the given table.
Renames a table.
Rollbacks transaction. Error will be thrown if transaction was not started.
Starts transaction.
Returns raw data stream.
Updates composite primary keys.
Generated using TypeDoc
Runs queries on a single SQL Server database connection.