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AKG;IACH,2CAAgB,GAAhB;QACI,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,yCAAc,GAAd;QACI,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,uCAAY,GAAZ;QACI,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACG,6CAAkB,GAAxB;;;gBACI,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;;;KACzE;IAED;;OAEG;IACG,+CAAoB,GAA1B;;;gBACI,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;;;KACzE;IAED,4EAA4E;IAC5E,oBAAoB;IACpB,4EAA4E;IAE5E;;OAEG;IACO,wCAAa,GAAvB,UAAwB,cAAsB;QAC1C,OAAO,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACnG,CAAC;IAEL,uBAAC;AAAD,CAxzBA,AAwzBC,IAAA","file":"MongoQueryRunner.js","sourcesContent":["import { QueryRunner } from \"../../query-runner/QueryRunner\";\nimport { ObjectLiteral } from \"../../common/ObjectLiteral\";\nimport { TableColumn } from \"../../schema-builder/table/TableColumn\";\nimport { Table } from \"../../schema-builder/table/Table\";\nimport { TableForeignKey } from \"../../schema-builder/table/TableForeignKey\";\nimport { TableIndex } from \"../../schema-builder/table/TableIndex\";\nimport {View} from \"../../schema-builder/view/View\";\nimport {\n    AggregationCursor,\n    BulkWriteOpResultObject,\n    ChangeStream,\n    ChangeStreamOptions,\n    Code,\n    Collection,\n    CollectionAggregationOptions,\n    CollectionBulkWriteOptions,\n    CollectionInsertManyOptions,\n    CollectionInsertOneOptions,\n    CollectionOptions,\n    CollStats,\n    CommandCursor,\n    Cursor,\n    Db,\n    DeleteWriteOpResultObject,\n    FindAndModifyWriteOpResultObject,\n    FindOneAndReplaceOption,\n    GeoHaystackSearchOptions,\n    GeoNearOptions,\n    InsertOneWriteOpResult,\n    InsertWriteOpResult,\n    MapReduceOptions,\n    MongoCountPreferences,\n    MongodbIndexOptions,\n    OrderedBulkOperation,\n    ParallelCollectionScanOptions,\n    ReadPreference,\n    ReplaceOneOptions,\n    UnorderedBulkOperation,\n    UpdateWriteOpResult\n} from \"./typings\";\nimport { Connection } from \"../../connection/Connection\";\nimport { ReadStream } from \"../../platform/PlatformTools\";\nimport { MongoEntityManager } from \"../../entity-manager/MongoEntityManager\";\nimport { SqlInMemory } from \"../SqlInMemory\";\nimport { TableUnique } from \"../../schema-builder/table/TableUnique\";\nimport { Broadcaster } from \"../../subscriber/Broadcaster\";\nimport { TableCheck } from \"../../schema-builder/table/TableCheck\";\nimport { TableExclusion } from \"../../schema-builder/table/TableExclusion\";\n\n/**\n * Runs queries on a single MongoDB connection.\n */\nexport class MongoQueryRunner implements QueryRunner {\n\n    // -------------------------------------------------------------------------\n    // Public Implemented Properties\n    // -------------------------------------------------------------------------\n\n    /**\n     * Connection used by this query runner.\n     */\n    connection: Connection;\n\n    /**\n     * Broadcaster used on this query runner to broadcast entity events.\n     */\n    broadcaster: Broadcaster;\n\n    /**\n     * Entity manager working only with current query runner.\n     */\n    manager: MongoEntityManager;\n\n    /**\n     * Indicates if connection for this query runner is released.\n     * Once its released, query runner cannot run queries anymore.\n     * Always false for mongodb since mongodb has a single query executor instance.\n     */\n    isReleased = false;\n\n    /**\n     * Indicates if transaction is active in this query executor.\n     * Always false for mongodb since mongodb does not support transactions.\n     */\n    isTransactionActive = false;\n\n    /**\n     * Stores temporarily user data.\n     * Useful for sharing data with subscribers.\n     */\n    data = {};\n\n    /**\n     * All synchronized tables in the database.\n     */\n    loadedTables: Table[];\n\n    /**\n     * All synchronized views in the database.\n     */\n    loadedViews: View[];\n\n    /**\n     * Real database connection from a connection pool used to perform queries.\n     */\n    databaseConnection: Db;\n\n    // -------------------------------------------------------------------------\n    // Constructor\n    // -------------------------------------------------------------------------\n\n    constructor(connection: Connection, databaseConnection: Db) {\n        this.connection = connection;\n        this.databaseConnection = databaseConnection;\n        this.broadcaster = new Broadcaster(this);\n    }\n\n    // -------------------------------------------------------------------------\n    // Public Methods\n    // -------------------------------------------------------------------------\n\n    /**\n     * Creates a cursor for a query that can be used to iterate over results from MongoDB.\n     */\n    cursor(collectionName: string, query?: ObjectLiteral): Cursor<any> {\n        return this.getCollection(collectionName).find(query || {});\n    }\n\n    /**\n     * Execute an aggregation framework pipeline against the collection.\n     */\n    aggregate(collectionName: string, pipeline: ObjectLiteral[], options?: CollectionAggregationOptions): AggregationCursor<any> {\n        return this.getCollection(collectionName).aggregate(pipeline, options);\n    }\n\n    /**\n     * Perform a bulkWrite operation without a fluent API.\n     */\n    async bulkWrite(collectionName: string, operations: ObjectLiteral[], options?: CollectionBulkWriteOptions): Promise<BulkWriteOpResultObject> {\n        return await this.getCollection(collectionName).bulkWrite(operations, options);\n    }\n\n    /**\n     * Count number of matching documents in the db to a query.\n     */\n    async count(collectionName: string, query?: ObjectLiteral, options?: MongoCountPreferences): Promise<any> {\n        return await this.getCollection(collectionName).countDocuments(query || {}, options);\n    }\n\n    /**\n     * Creates an index on the db and collection.\n     */\n    async createCollectionIndex(collectionName: string, fieldOrSpec: string | any, options?: MongodbIndexOptions): Promise<string> {\n        return await this.getCollection(collectionName).createIndex(fieldOrSpec, options);\n    }\n\n    /**\n     * Creates multiple indexes in the collection, this method is only supported for MongoDB 2.6 or higher.\n     * Earlier version of MongoDB will throw a command not supported error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.\n     */\n    async createCollectionIndexes(collectionName: string, indexSpecs: ObjectLiteral[]): Promise<void> {\n        return await this.getCollection(collectionName).createIndexes(indexSpecs);\n    }\n\n    /**\n     * Delete multiple documents on MongoDB.\n     */\n    async deleteMany(collectionName: string, query: ObjectLiteral, options?: CollectionOptions): Promise<DeleteWriteOpResultObject> {\n        return await this.getCollection(collectionName).deleteMany(query, options);\n    }\n\n    /**\n     * Delete a document on MongoDB.\n     */\n    async deleteOne(collectionName: string, query: ObjectLiteral, options?: CollectionOptions): Promise<DeleteWriteOpResultObject> {\n        return await this.getCollection(collectionName).deleteOne(query, options);\n    }\n\n    /**\n     * The distinct command returns returns a list of distinct values for the given key across a collection.\n     */\n    async distinct(collectionName: string, key: string, query: ObjectLiteral, options?: { readPreference?: ReadPreference | string }): Promise<any> {\n        return await this.getCollection(collectionName).distinct(key, query, options);\n    }\n\n    /**\n     * Drops an index from this collection.\n     */\n    async dropCollectionIndex(collectionName: string, indexName: string, options?: CollectionOptions): Promise<any> {\n        return await this.getCollection(collectionName).dropIndex(indexName, options);\n    }\n\n    /**\n     * Drops all indexes from the collection.\n     */\n    async dropCollectionIndexes(collectionName: string): Promise<any> {\n        return await this.getCollection(collectionName).dropIndexes();\n    }\n\n    /**\n     * Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation.\n     */\n    async findOneAndDelete(collectionName: string, query: ObjectLiteral, options?: { projection?: Object, sort?: Object, maxTimeMS?: number }): Promise<FindAndModifyWriteOpResultObject> {\n        return await this.getCollection(collectionName).findOneAndDelete(query, options);\n    }\n\n    /**\n     * Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation.\n     */\n    async findOneAndReplace(collectionName: string, query: ObjectLiteral, replacement: Object, options?: FindOneAndReplaceOption): Promise<FindAndModifyWriteOpResultObject> {\n        return await this.getCollection(collectionName).findOneAndReplace(query, replacement, options);\n    }\n\n    /**\n     * Find a document and update it in one atomic operation, requires a write lock for the duration of the operation.\n     */\n    async findOneAndUpdate(collectionName: string, query: ObjectLiteral, update: Object, options?: FindOneAndReplaceOption): Promise<FindAndModifyWriteOpResultObject> {\n        return await this.getCollection(collectionName).findOneAndUpdate(query, update, options);\n    }\n\n    /**\n     * Execute a geo search using a geo haystack index on a collection.\n     */\n    async geoHaystackSearch(collectionName: string, x: number, y: number, options?: GeoHaystackSearchOptions): Promise<any> {\n        return await this.getCollection(collectionName).geoHaystackSearch(x, y, options);\n    }\n\n    /**\n     * Execute the geoNear command to search for items in the collection.\n     */\n    async geoNear(collectionName: string, x: number, y: number, options?: GeoNearOptions): Promise<any> {\n        return await this.getCollection(collectionName).geoNear(x, y, options);\n    }\n\n    /**\n     * Run a group command across a collection.\n     */\n    async group(collectionName: string, keys: Object | Array<any> | Function | Code, condition: Object, initial: Object, reduce: Function | Code, finalize: Function | Code, command: boolean, options?: { readPreference?: ReadPreference | string }): Promise<any> {\n        return await this.getCollection(collectionName).group(keys, condition, initial, reduce, finalize, command, options);\n    }\n\n    /**\n     * Retrieve all the indexes on the collection.\n     */\n    async collectionIndexes(collectionName: string): Promise<any> {\n        return await this.getCollection(collectionName).indexes();\n    }\n\n    /**\n     * Retrieve all the indexes on the collection.\n     */\n    async collectionIndexExists(collectionName: string, indexes: string | string[]): Promise<boolean> {\n        return await this.getCollection(collectionName).indexExists(indexes);\n    }\n\n    /**\n     * Retrieves this collections index info.\n     */\n    async collectionIndexInformation(collectionName: string, options?: { full: boolean }): Promise<any> {\n        return await this.getCollection(collectionName).indexInformation(options);\n    }\n\n    /**\n     * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types.\n     */\n    initializeOrderedBulkOp(collectionName: string, options?: CollectionOptions): OrderedBulkOperation {\n        return this.getCollection(collectionName).initializeOrderedBulkOp(options);\n    }\n\n    /**\n     * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.\n     */\n    initializeUnorderedBulkOp(collectionName: string, options?: CollectionOptions): UnorderedBulkOperation {\n        return this.getCollection(collectionName).initializeUnorderedBulkOp(options);\n    }\n\n    /**\n     * Inserts an array of documents into MongoDB.\n     */\n    async insertMany(collectionName: string, docs: ObjectLiteral[], options?: CollectionInsertManyOptions): Promise<InsertWriteOpResult> {\n        return await this.getCollection(collectionName).insertMany(docs, options);\n    }\n\n    /**\n     * Inserts a single document into MongoDB.\n     */\n    async insertOne(collectionName: string, doc: ObjectLiteral, options?: CollectionInsertOneOptions): Promise<InsertOneWriteOpResult> {\n        return await this.getCollection(collectionName).insertOne(doc, options);\n    }\n\n    /**\n     * Returns if the collection is a capped collection.\n     */\n    async isCapped(collectionName: string): Promise<any> {\n        return await this.getCollection(collectionName).isCapped();\n    }\n\n    /**\n     * Get the list of all indexes information for the collection.\n     */\n    listCollectionIndexes(collectionName: string, options?: { batchSize?: number, readPreference?: ReadPreference | string }): CommandCursor {\n        return this.getCollection(collectionName).listIndexes(options);\n    }\n\n    /**\n     * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.\n     */\n    async mapReduce(collectionName: string, map: Function | string, reduce: Function | string, options?: MapReduceOptions): Promise<any> {\n        return await this.getCollection(collectionName).mapReduce(map, reduce, options);\n    }\n\n    /**\n     * Return N number of parallel cursors for a collection allowing parallel reading of entire collection.\n     * There are no ordering guarantees for returned results.\n     */\n    async parallelCollectionScan(collectionName: string, options?: ParallelCollectionScanOptions): Promise<Cursor<any>[]> {\n        return await this.getCollection(collectionName).parallelCollectionScan(options);\n    }\n\n    /**\n     * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.\n     */\n    async reIndex(collectionName: string): Promise<any> {\n        return await this.getCollection(collectionName).reIndex();\n    }\n\n    /**\n     * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.\n     */\n    async rename(collectionName: string, newName: string, options?: { dropTarget?: boolean }): Promise<Collection<any>> {\n        return await this.getCollection(collectionName).rename(newName, options);\n    }\n\n    /**\n     * Replace a document on MongoDB.\n     */\n    async replaceOne(collectionName: string, query: ObjectLiteral, doc: ObjectLiteral, options?: ReplaceOneOptions): Promise<UpdateWriteOpResult> {\n        return await this.getCollection(collectionName).replaceOne(query, doc, options);\n    }\n\n    /**\n     * Get all the collection statistics.\n     */\n    async stats(collectionName: string, options?: { scale: number }): Promise<CollStats> {\n        return await this.getCollection(collectionName).stats(options);\n    }\n\n    /**\n     * Watching new changes as stream.\n     */\n    watch(collectionName: string, pipeline?: Object[], options?: ChangeStreamOptions): ChangeStream {\n        return this.getCollection(collectionName).watch(pipeline, options);\n    }\n\n    /**\n     * Update multiple documents on MongoDB.\n     */\n    async updateMany(collectionName: string, query: ObjectLiteral, update: ObjectLiteral, options?: { upsert?: boolean, w?: any, wtimeout?: number, j?: boolean }): Promise<UpdateWriteOpResult> {\n        return await this.getCollection(collectionName).updateMany(query, update, options);\n    }\n\n    /**\n     * Update a single document on MongoDB.\n     */\n    async updateOne(collectionName: string, query: ObjectLiteral, update: ObjectLiteral, options?: ReplaceOneOptions): Promise<UpdateWriteOpResult> {\n        return await this.getCollection(collectionName).updateOne(query, update, options);\n    }\n\n    // -------------------------------------------------------------------------\n    // Public Implemented Methods (from QueryRunner)\n    // -------------------------------------------------------------------------\n\n    /**\n     * Removes all collections from the currently connected database.\n     * Be careful with using this method and avoid using it in production or migrations\n     * (because it can clear all your database).\n     */\n    async clearDatabase(): Promise<void> {\n        await this.databaseConnection.db(this.connection.driver.database!).dropDatabase();\n    }\n\n    /**\n     * For MongoDB database we don't create connection, because its single connection already created by a driver.\n     */\n    async connect(): Promise<any> {\n    }\n\n    /**\n     * For MongoDB database we don't release connection, because its single connection.\n     */\n    async release(): Promise<void> {\n        // releasing connection are not supported by mongodb driver, so simply don't do anything here\n    }\n\n    /**\n     * Starts transaction.\n     */\n    async startTransaction(): Promise<void> {\n        // transactions are not supported by mongodb driver, so simply don't do anything here\n    }\n\n    /**\n     * Commits transaction.\n     */\n    async commitTransaction(): Promise<void> {\n        // transactions are not supported by mongodb driver, so simply don't do anything here\n    }\n\n    /**\n     * Rollbacks transaction.\n     */\n    async rollbackTransaction(): Promise<void> {\n        // transactions are not supported by mongodb driver, so simply don't do anything here\n    }\n\n    /**\n     * Executes a given SQL query.\n     */\n    query(query: string, parameters?: any[]): Promise<any> {\n        throw new Error(`Executing SQL query is not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Returns raw data stream.\n     */\n    stream(query: string, parameters?: any[], onEnd?: Function, onError?: Function): Promise<ReadStream> {\n        throw new Error(`Stream is not supported by MongoDB driver. Use watch instead.`);\n    }\n\n    /**\n     * Insert a new row with given values into the given table.\n     * Returns value of inserted object id.\n\n    async insert(collectionName: string, keyValues: ObjectLiteral): Promise<any> { // todo: fix any\n        const results = await this.databaseConnection\n            .collection(collectionName)\n            .insertOne(keyValues);\n        const generatedMap = this.connection.getMetadata(collectionName).objectIdColumn!.createValueMap(results.insertedId);\n        return {\n            result: results,\n            generatedMap: generatedMap\n        };\n    }*/\n\n    /**\n     * Updates rows that match given conditions in the given table.\n\n    async update(collectionName: string, valuesMap: ObjectLiteral, conditions: ObjectLiteral): Promise<any> { // todo: fix any\n        await this.databaseConnection\n            .collection(collectionName)\n            .updateOne(conditions, valuesMap);\n    }*/\n\n    /**\n     * Deletes from the given table by a given conditions.\n\n    async delete(collectionName: string, conditions: ObjectLiteral|ObjectLiteral[]|string, maybeParameters?: any[]): Promise<any> { // todo: fix any\n        if (typeof conditions === \"string\")\n            throw new Error(`String condition is not supported by MongoDB driver.`);\n\n        await this.databaseConnection\n            .collection(collectionName)\n            .deleteOne(conditions);\n    }*/\n\n    /**\n     * Returns all available database names including system databases.\n     */\n    async getDatabases(): Promise<string[]> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Returns all available schema names including system schemas.\n     * If database parameter specified, returns schemas of that database.\n     */\n    async getSchemas(database?: string): Promise<string[]> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Loads given table's data from the database.\n     */\n    async getTable(collectionName: string): Promise<Table | undefined> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Loads all tables (with given names) from the database and creates a Table from them.\n     */\n    async getTables(collectionNames: string[]): Promise<Table[]> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Loads given views's data from the database.\n     */\n    async getView(collectionName: string): Promise<View | undefined> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Loads all views (with given names) from the database and creates a Table from them.\n     */\n    async getViews(collectionNames: string[]): Promise<View[]> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Checks if database with the given name exist.\n     */\n    async hasDatabase(database: string): Promise<boolean> {\n        throw new Error(`Check database queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Checks if schema with the given name exist.\n     */\n    async hasSchema(schema: string): Promise<boolean> {\n        throw new Error(`Check schema queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Checks if table with the given name exist in the database.\n     */\n    async hasTable(collectionName: string): Promise<boolean> {\n        throw new Error(`Check schema queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Checks if column with the given name exist in the given table.\n     */\n    async hasColumn(tableOrName: Table | string, columnName: string): Promise<boolean> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a database if it's not created.\n     */\n    async createDatabase(database: string): Promise<void> {\n        throw new Error(`Database create queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops database.\n     */\n    async dropDatabase(database: string, ifExist?: boolean): Promise<void> {\n        throw new Error(`Database drop queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new table schema.\n     */\n    async createSchema(schema: string, ifNotExist?: boolean): Promise<void> {\n        throw new Error(`Schema create queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops table schema.\n     */\n    async dropSchema(schemaPath: string, ifExist?: boolean): Promise<void> {\n        throw new Error(`Schema drop queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new table from the given table and columns inside it.\n     */\n    async createTable(table: Table): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops the table.\n     */\n    async dropTable(tableName: Table | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new view.\n     */\n    async createView(view: View): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops the view.\n     */\n    async dropView(target: View|string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Renames the given table.\n     */\n    async renameTable(oldTableOrName: Table | string, newTableOrName: Table | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new column from the column in the table.\n     */\n    async addColumn(tableOrName: Table | string, column: TableColumn): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new columns from the column in the table.\n     */\n    async addColumns(tableOrName: Table | string, columns: TableColumn[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Renames column in the given table.\n     */\n    async renameColumn(tableOrName: Table | string, oldTableColumnOrName: TableColumn | string, newTableColumnOrName: TableColumn | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Changes a column in the table.\n     */\n    async changeColumn(tableOrName: Table | string, oldTableColumnOrName: TableColumn | string, newColumn: TableColumn): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Changes a column in the table.\n     */\n    async changeColumns(tableOrName: Table | string, changedColumns: { newColumn: TableColumn, oldColumn: TableColumn }[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops column in the table.\n     */\n    async dropColumn(tableOrName: Table | string, columnOrName: TableColumn | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops the columns in the table.\n     */\n    async dropColumns(tableOrName: Table | string, columns: TableColumn[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new primary key.\n     */\n    async createPrimaryKey(tableOrName: Table | string, columnNames: string[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Updates composite primary keys.\n     */\n    async updatePrimaryKeys(tableOrName: Table | string, columns: TableColumn[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops a primary key.\n     */\n    async dropPrimaryKey(tableOrName: Table | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new unique constraint.\n     */\n    async createUniqueConstraint(tableOrName: Table | string, uniqueConstraint: TableUnique): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new unique constraints.\n     */\n    async createUniqueConstraints(tableOrName: Table | string, uniqueConstraints: TableUnique[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops an unique constraint.\n     */\n    async dropUniqueConstraint(tableOrName: Table | string, uniqueOrName: TableUnique | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops an unique constraints.\n     */\n    async dropUniqueConstraints(tableOrName: Table | string, uniqueConstraints: TableUnique[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new check constraint.\n     */\n    async createCheckConstraint(tableOrName: Table | string, checkConstraint: TableCheck): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new check constraints.\n     */\n    async createCheckConstraints(tableOrName: Table | string, checkConstraints: TableCheck[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops check constraint.\n     */\n    async dropCheckConstraint(tableOrName: Table | string, checkOrName: TableCheck | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops check constraints.\n     */\n    async dropCheckConstraints(tableOrName: Table | string, checkConstraints: TableCheck[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new exclusion constraint.\n     */\n    async createExclusionConstraint(tableOrName: Table | string, exclusionConstraint: TableExclusion): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new exclusion constraints.\n     */\n    async createExclusionConstraints(tableOrName: Table | string, exclusionConstraints: TableExclusion[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops exclusion constraint.\n     */\n    async dropExclusionConstraint(tableOrName: Table | string, exclusionOrName: TableExclusion | string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops exclusion constraints.\n     */\n    async dropExclusionConstraints(tableOrName: Table | string, exclusionConstraints: TableExclusion[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new foreign key.\n     */\n    async createForeignKey(tableOrName: Table | string, foreignKey: TableForeignKey): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new foreign keys.\n     */\n    async createForeignKeys(tableOrName: Table | string, foreignKeys: TableForeignKey[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops a foreign key from the table.\n     */\n    async dropForeignKey(tableOrName: Table | string, foreignKey: TableForeignKey): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops a foreign keys from the table.\n     */\n    async dropForeignKeys(tableOrName: Table | string, foreignKeys: TableForeignKey[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new index.\n     */\n    async createIndex(tableOrName: Table | string, index: TableIndex): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Creates a new indices\n     */\n    async createIndices(tableOrName: Table | string, indices: TableIndex[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops an index from the table.\n     */\n    async dropIndex(collectionName: string, indexName: string): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops an indices from the table.\n     */\n    async dropIndices(tableOrName: Table | string, indices: TableIndex[]): Promise<void> {\n        throw new Error(`Schema update queries are not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Drops collection.\n     */\n    async clearTable(collectionName: string): Promise<void> {\n        await this.databaseConnection\n            .db(this.connection.driver.database!)\n            .dropCollection(collectionName);\n    }\n\n    /**\n     * Enables special query runner mode in which sql queries won't be executed,\n     * instead they will be memorized into a special variable inside query runner.\n     * You can get memorized sql using getMemorySql() method.\n     */\n    enableSqlMemory(): void {\n        throw new Error(`This operation is not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Disables special query runner mode in which sql queries won't be executed\n     * started by calling enableSqlMemory() method.\n     *\n     * Previously memorized sql will be flushed.\n     */\n    disableSqlMemory(): void {\n        throw new Error(`This operation is not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Flushes all memorized sqls.\n     */\n    clearSqlMemory(): void {\n        throw new Error(`This operation is not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Gets sql stored in the memory. Parameters in the sql are already replaced.\n     */\n    getMemorySql(): SqlInMemory {\n        throw new Error(`This operation is not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Executes up sql queries.\n     */\n    async executeMemoryUpSql(): Promise<void> {\n        throw new Error(`This operation is not supported by MongoDB driver.`);\n    }\n\n    /**\n     * Executes down sql queries.\n     */\n    async executeMemoryDownSql(): Promise<void> {\n        throw new Error(`This operation is not supported by MongoDB driver.`);\n    }\n\n    // -------------------------------------------------------------------------\n    // Protected Methods\n    // -------------------------------------------------------------------------\n\n    /**\n     * Gets collection from the database with a given name.\n     */\n    protected getCollection(collectionName: string): Collection<any> {\n        return this.databaseConnection.db(this.connection.driver.database!).collection(collectionName);\n    }\n\n}\n"],"sourceRoot":"../.."}