"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var LiteralRepository_1 = require("./LiteralRepository");
/**
 * Repository is supposed to work with your entity objects. Find entities, insert, update, delete, etc.
 */
function createLiteralMongoRepository(_a) {
    var manager = _a.manager, metadata = _a.metadata, queryRunner = _a.queryRunner;
    return tslib_1.__assign({}, LiteralRepository_1.createLiteralRepository({ manager: manager, metadata: metadata, queryRunner: queryRunner }), { manager: undefined, 
        // manager: undefined as any,
        query: function (query, parameters) {
            throw new Error("Queries aren't supported by MongoDB.");
        },
        createQueryBuilder: function (alias, queryRunner) {
            throw new Error("Query Builder is not supported by MongoDB.");
        },
        find: function (optionsOrConditions) {
            return this.manager.find(this.metadata.target, optionsOrConditions);
        },
        findAndCount: function (optionsOrConditions) {
            return this.manager.findAndCount(this.metadata.target, optionsOrConditions);
        },
        findByIds: function (ids, optionsOrConditions) {
            return this.manager.findByIds(this.metadata.target, ids, optionsOrConditions);
        },
        findOne: function (optionsOrConditions, maybeOptions) {
            return this.manager.findOne(this.metadata.target, optionsOrConditions, maybeOptions);
        },
        createCursor: function (query) {
            return this.manager.createCursor(this.metadata.target, query);
        },
        createEntityCursor: function (query) {
            return this.manager.createEntityCursor(this.metadata.target, query);
        },
        aggregate: function (pipeline, options) {
            return this.manager.aggregate(this.metadata.target, pipeline, options);
        },
        aggregateEntity: function (pipeline, options) {
            return this.manager.aggregateEntity(this.metadata.target, pipeline, options);
        },
        bulkWrite: function (operations, options) {
            return this.manager.bulkWrite(this.metadata.target, operations, options);
        },
        count: function (query, options, mongoOptions) {
            return this.manager.count(this.metadata.target, query || {}, options, mongoOptions);
        },
        createCollectionIndex: function (fieldOrSpec, options) {
            return this.manager.createCollectionIndex(this.metadata.target, fieldOrSpec, options);
        },
        createCollectionIndexes: function (indexSpecs) {
            return this.manager.createCollectionIndexes(this.metadata.target, indexSpecs);
        },
        deleteMany: function (query, options) {
            return this.manager.deleteMany(this.metadata.tableName, query, options);
        },
        deleteOne: function (query, options) {
            return this.manager.deleteOne(this.metadata.tableName, query, options);
        },
        distinct: function (key, query, options) {
            return this.manager.distinct(this.metadata.tableName, key, query, options);
        },
        dropCollectionIndex: function (indexName, options) {
            return this.manager.dropCollectionIndex(this.metadata.tableName, indexName, options);
        },
        dropCollectionIndexes: function () {
            return this.manager.dropCollectionIndexes(this.metadata.tableName);
        },
        findOneAndDelete: function (query, options) {
            return this.manager.findOneAndDelete(this.metadata.tableName, query, options);
        },
        findOneAndReplace: function (query, replacement, options) {
            return this.manager.findOneAndReplace(this.metadata.tableName, query, replacement, options);
        },
        findOneAndUpdate: function (query, update, options) {
            return this.manager.findOneAndUpdate(this.metadata.tableName, query, update, options);
        },
        geoHaystackSearch: function (x, y, options) {
            return this.manager.geoHaystackSearch(this.metadata.tableName, x, y, options);
        },
        geoNear: function (x, y, options) {
            return this.manager.geoNear(this.metadata.tableName, x, y, options);
        },
        group: function (keys, condition, initial, reduce, finalize, command, options) {
            return this.manager.group(this.metadata.tableName, keys, condition, initial, reduce, finalize, command, options);
        },
        collectionIndexes: function () {
            return this.manager.collectionIndexes(this.metadata.tableName);
        },
        collectionIndexExists: function (indexes) {
            return this.manager.collectionIndexExists(this.metadata.tableName, indexes);
        },
        collectionIndexInformation: function (options) {
            return this.manager.collectionIndexInformation(this.metadata.tableName, options);
        },
        initializeOrderedBulkOp: function (options) {
            return this.manager.initializeOrderedBulkOp(this.metadata.tableName, options);
        },
        initializeUnorderedBulkOp: function (options) {
            return this.manager.initializeUnorderedBulkOp(this.metadata.tableName, options);
        },
        insertMany: function (docs, options) {
            return this.manager.insertMany(this.metadata.tableName, docs, options);
        },
        insertOne: function (doc, options) {
            return this.manager.insertOne(this.metadata.tableName, doc, options);
        },
        isCapped: function () {
            return this.manager.isCapped(this.metadata.tableName);
        },
        listCollectionIndexes: function (options) {
            return this.manager.listCollectionIndexes(this.metadata.tableName, options);
        },
        mapReduce: function (map, reduce, options) {
            return this.manager.mapReduce(this.metadata.tableName, map, reduce, options);
        },
        parallelCollectionScan: function (options) {
            return this.manager.parallelCollectionScan(this.metadata.tableName, options);
        },
        reIndex: function () {
            return this.manager.reIndex(this.metadata.tableName);
        },
        rename: function (newName, options) {
            return this.manager.rename(this.metadata.tableName, newName, options);
        },
        replaceOne: function (query, doc, options) {
            return this.manager.replaceOne(this.metadata.tableName, query, doc, options);
        },
        stats: function (options) {
            return this.manager.stats(this.metadata.tableName, options);
        },
        updateMany: function (query, update, options) {
            return this.manager.updateMany(this.metadata.tableName, query, update, options);
        },
        updateOne: function (query, update, options) {
            return this.manager.updateOne(this.metadata.tableName, query, update, options);
        } });
}
exports.createLiteralMongoRepository = createLiteralMongoRepository;

//# sourceMappingURL=LiteralMongoRepository.js.map
