Runs queries on a single sqlite database connection.
Does not support compose primary keys with autoincrement field. todo: need to throw exception for this case.
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.
All synchronized views 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.
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.
Changes a column in the table.
Changes a column in the table. Changed column looses all its keys in the db.
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.
Creates new check constraint.
Creates new check constraints.
Creates a new database.
Creates a new exclusion constraint.
Creates a new exclusion constraints.
Creates a new foreign key.
Creates a new foreign keys.
Creates a new index.
Builds create index sql.
Creates a new indices
Creates a new primary key.
Creates a new table schema.
Creates a new table.
Builds create table sql.
Creates a new unique constraint.
Creates a new unique constraints.
Creates a new view.
Builds remove view sql.
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.
Drops check constraints.
Drops column in the table.
Drops the columns in the table.
Drops exclusion constraint.
Drops exclusion constraints.
Drops a foreign key from the table.
Drops a foreign keys from the table.
Drops an index from the table.
Builds drop index sql.
Drops an indices from the table.
Drops a primary key.
Drops table schema.
Drops the table.
Builds drop table sql.
Drops an unique constraint.
Creates an unique constraints.
Drops the view.
Builds drop view sql.
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.
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.
Gets view from previously loaded views, otherwise loads it from database.
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.
Loads given view's data from the database.
Loads given view's data from the database.
Checks if column with the given name exist in the given 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.
Executes a given SQL query.
Releases used database connection. We just clear loaded tables and sql in memory, because sqlite do not support multiple connections thus query runners.
Renames column in the given table.
Renames the given table.
Replaces loaded table with given changed table.
Rollbacks transaction. Error will be thrown if transaction was not started.
Returns raw data stream.
Updates composite primary keys.