????

Your IP : 3.148.201.19


Current Path : C:/inetpub/vhost/invest.gdtsolutions.vn/api/node_modules/typeorm/repository/
Upload File :
Current File : C:/inetpub/vhost/invest.gdtsolutions.vn/api/node_modules/typeorm/repository/MongoRepository.js.map

{"version":3,"sources":["../../src/repository/MongoRepository.ts"],"names":[],"mappings":";;;AACA,6CAAyC;AAKzC,wDAAoD;AA2CpD;;GAEG;AACH,MAAa,eAEX,SAAQ,uBAAkB;IAUxB,4EAA4E;IAC5E,qBAAqB;IACrB,4EAA4E;IAE5E;;;OAGG;IACH,KAAK,CAAC,KAAa,EAAE,UAAkB;QACnC,MAAM,IAAI,2BAAY,CAAC,sCAAsC,CAAC,CAAA;IAClE,CAAC;IAED;;;OAGG;IACH,kBAAkB,CACd,KAAa,EACb,WAAyB;QAEzB,MAAM,IAAI,2BAAY,CAAC,4CAA4C,CAAC,CAAA;IACxE,CAAC;IAED;;OAEG;IACH,IAAI,CACA,OAG6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC3D,CAAC;IAED;;;;OAIG;IACH,YAAY,CACR,OAAsC;QAEtC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnE,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,KAAU;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IACnE,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CAAC,GAAU,EAAE,OAAa;QAC/B,OAAO,I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Q,CAAC,SAAS,EACvB,KAAK,EACL,MAAM,EACN,OAAO,CACV,CAAA;IACL,CAAC;IAED;;OAEG;IACH,SAAS,CACL,KAAoB,EACpB,MAA8B,EAC9B,OAAuB;QAEvB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CACzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EACvB,KAAK,EACL,MAAM,EACN,OAAO,CACV,CAAA;IACL,CAAC;CACJ;AA/eD,0CA+eC","file":"MongoRepository.js","sourcesContent":["import { ObjectLiteral } from \"../common/ObjectLiteral\"\nimport { Repository } from \"./Repository\"\nimport { MongoFindManyOptions } from \"../find-options/mongodb/MongoFindManyOptions\"\nimport { MongoEntityManager } from \"../entity-manager/MongoEntityManager\"\nimport { QueryRunner } from \"../query-runner/QueryRunner\"\nimport { SelectQueryBuilder } from \"../query-builder/SelectQueryBuilder\"\nimport { TypeORMError } from \"../error/TypeORMError\"\nimport { MongoFindOneOptions } from \"../find-options/mongodb/MongoFindOneOptions\"\nimport { FindOneOptions } from \"../find-options/FindOneOptions\"\n\nimport {\n    CreateIndexesOptions,\n    ObjectId,\n    ReplaceOptions,\n    //\n    AggregateOptions,\n    AggregationCursor,\n    AnyBulkWriteOperation,\n    BulkWriteOptions,\n    BulkWriteResult,\n    Collection,\n    CollStats,\n    CollStatsOptions,\n    CommandOperationOptions,\n    CountOptions,\n    DeleteOptions,\n    DeleteResult,\n    Document,\n    Filter,\n    FilterOperators,\n    FindCursor,\n    FindOneAndDeleteOptions,\n    FindOneAndReplaceOptions,\n    FindOneAndUpdateOptions,\n    IndexDescription,\n    InsertManyResult,\n    InsertOneOptions,\n    InsertOneResult,\n    ListIndexesCursor,\n    ListIndexesOptions,\n    OrderedBulkOperation,\n    UnorderedBulkOperation,\n    UpdateFilter,\n    UpdateOptions,\n    UpdateResult,\n    CountDocumentsOptions,\n} from \"../driver/mongodb/typings\"\nimport { FindManyOptions } from \"../find-options/FindManyOptions\"\n\n/**\n * Repository used to manage mongodb documents of a single entity type.\n */\nexport class MongoRepository<\n    Entity extends ObjectLiteral,\n> extends Repository<Entity> {\n    // -------------------------------------------------------------------------\n    // Public Properties\n    // -------------------------------------------------------------------------\n\n    /**\n     * Entity Manager used by this repository.\n     */\n    readonly manager: MongoEntityManager\n\n    // -------------------------------------------------------------------------\n    // Overridden Methods\n    // -------------------------------------------------------------------------\n\n    /**\n     * Raw SQL query execution is not supported by MongoDB.\n     * Calling this method will return an error.\n     */\n    query(query: string, parameters?: any[]): Promise<any> {\n        throw new TypeORMError(`Queries aren't supported by MongoDB.`)\n    }\n\n    /**\n     * Using Query Builder with MongoDB is not supported yet.\n     * Calling this method will return an error.\n     */\n    createQueryBuilder(\n        alias: string,\n        queryRunner?: QueryRunner,\n    ): SelectQueryBuilder<Entity> {\n        throw new TypeORMError(`Query Builder is not supported by MongoDB.`)\n    }\n\n    /**\n     * Finds entities that match given find options or conditions.\n     */\n    find(\n        options?:\n            | FindManyOptions<Entity>\n            | Partial<Entity>\n            | FilterOperators<Entity>,\n    ): Promise<Entity[]> {\n        return this.manager.find(this.metadata.target, options)\n    }\n\n    /**\n     * Finds entities that match given find options or conditions.\n     */\n    findBy(where: any): Promise<Entity[]> {\n        return this.manager.findBy(this.metadata.target, where)\n    }\n\n    /**\n     * Finds entities that match given find options or conditions.\n     * Also counts all entities that match given conditions,\n     * but ignores pagination settings (from and take options).\n     */\n    findAndCount(\n        options?: MongoFindManyOptions<Entity>,\n    ): Promise<[Entity[], number]> {\n        return this.manager.findAndCount(this.metadata.target, options)\n    }\n\n    /**\n     * Finds entities that match given find options or conditions.\n     * Also counts all entities that match given conditions,\n     * but ignores pagination settings (from and take options).\n     */\n    findAndCountBy(where: any): Promise<[Entity[], number]> {\n        return this.manager.findAndCountBy(this.metadata.target, where)\n    }\n\n    /**\n     * Finds entities by ids.\n     * Optionally find options can be applied.\n     *\n     * @deprecated use `findBy` method instead in conjunction with `In` operator, for example:\n     *\n     * .findBy({\n     *     id: In([1, 2, 3])\n     * })\n     */\n    findByIds(ids: any[], options?: any): Promise<Entity[]> {\n        return this.manager.findByIds(this.metadata.target, ids, options)\n    }\n\n    /**\n     * Finds first entity that matches given find options.\n     */\n    async findOne(\n        options: MongoFindOneOptions<Entity>,\n    ): Promise<Entity | null> {\n        return this.manager.findOne(this.metadata.target, options)\n    }\n\n    /**\n     * Finds first entity that matches given WHERE conditions.\n     */\n    async findOneBy(where: any): Promise<Entity | null> {\n        return this.manager.findOneBy(this.metadata.target, where)\n    }\n\n    /**\n     * Finds entity that matches given id.\n     *\n     * @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:\n     *\n     * .findOneBy({\n     *     id: 1 // where \"id\" is your primary column name\n     * })\n     */\n    async findOneById(\n        id: string | number | Date | ObjectId,\n    ): Promise<Entity | null> {\n        return this.manager.findOneById(this.metadata.target, id)\n    }\n\n    /**\n     * Finds first entity by a given find options.\n     * If entity was not found in the database - rejects with error.\n     */\n    async findOneOrFail(options: FindOneOptions<Entity>): Promise<Entity> {\n        return this.manager.findOneOrFail(this.metadata.target, options)\n    }\n\n    /**\n     * Finds first entity that matches given where condition.\n     * If entity was not found in the database - rejects with error.\n     */\n    async findOneByOrFail(where: any): Promise<Entity> {\n        return this.manager.findOneByOrFail(this.metadata.target, where)\n    }\n\n    /**\n     * Creates a cursor for a query that can be used to iterate over results from MongoDB.\n     */\n    createCursor<T = any>(query?: Filter<Entity>): FindCursor<T> {\n        return this.manager.createCursor(this.metadata.target, query)\n    }\n\n    /**\n     * Creates a cursor for a query that can be used to iterate over results from MongoDB.\n     * This returns modified version of cursor that transforms each result into Entity model.\n     */\n    createEntityCursor(query?: Filter<Entity>): FindCursor<Entity> {\n        return this.manager.createEntityCursor(this.metadata.target, query)\n    }\n\n    /**\n     * Execute an aggregation framework pipeline against the collection.\n     */\n    aggregate<R = any>(\n        pipeline: ObjectLiteral[],\n        options?: AggregateOptions,\n    ): AggregationCursor<Entity> {\n        return this.manager.aggregate<R>(\n            this.metadata.target,\n            pipeline,\n            options,\n        )\n    }\n\n    /**\n     * Execute an aggregation framework pipeline against the collection.\n     * This returns modified version of cursor that transforms each result into Entity model.\n     */\n    aggregateEntity(\n        pipeline: ObjectLiteral[],\n        options?: AggregateOptions,\n    ): AggregationCursor<Entity> {\n        return this.manager.aggregateEntity(\n            this.metadata.target,\n            pipeline,\n            options,\n        )\n    }\n    /**\n     * Perform a bulkWrite operation without a fluent API.\n     */\n    bulkWrite(\n        operations: AnyBulkWriteOperation[],\n        options?: BulkWriteOptions,\n    ): Promise<BulkWriteResult> {\n        return this.manager.bulkWrite(this.metadata.target, operations, options)\n    }\n\n    /**\n     * Count number of matching documents in the db to a query.\n     */\n    count(query?: ObjectLiteral, options?: CountOptions): Promise<number> {\n        return this.manager.count(this.metadata.target, query || {}, options)\n    }\n\n    /**\n     * Count number of matching documents in the db to a query.\n     */\n    countDocuments(\n        query?: ObjectLiteral,\n        options?: CountDocumentsOptions,\n    ): Promise<number> {\n        return this.manager.countDocuments(\n            this.metadata.target,\n            query || {},\n            options,\n        )\n    }\n\n    /**\n     * Count number of matching documents in the db to a query.\n     */\n    countBy(query?: ObjectLiteral, options?: CountOptions): Promise<number> {\n        return this.manager.countBy(this.metadata.target, query, options)\n    }\n\n    /**\n     * Creates an index on the db and collection.\n     */\n    createCollectionIndex(\n        fieldOrSpec: string | any,\n        options?: CreateIndexesOptions,\n    ): Promise<string> {\n        return this.manager.createCollectionIndex(\n            this.metadata.target,\n            fieldOrSpec,\n            options,\n        )\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.\n     * Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.\n     */\n    createCollectionIndexes(indexSpecs: IndexDescription[]): Promise<string[]> {\n        return this.manager.createCollectionIndexes(\n            this.metadata.target,\n            indexSpecs,\n        )\n    }\n\n    /**\n     * Delete multiple documents on MongoDB.\n     */\n    deleteMany(\n        query: ObjectLiteral,\n        options?: DeleteOptions,\n    ): Promise<DeleteResult> {\n        return this.manager.deleteMany(this.metadata.tableName, query, options)\n    }\n\n    /**\n     * Delete a document on MongoDB.\n     */\n    deleteOne(\n        query: ObjectLiteral,\n        options?: DeleteOptions,\n    ): Promise<DeleteResult> {\n        return this.manager.deleteOne(this.metadata.tableName, 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    distinct(\n        key: string,\n        query: ObjectLiteral,\n        options?: CommandOperationOptions,\n    ): Promise<any> {\n        return this.manager.distinct(\n            this.metadata.tableName,\n            key,\n            query,\n            options,\n        )\n    }\n\n    /**\n     * Drops an index from this collection.\n     */\n    dropCollectionIndex(\n        indexName: string,\n        options?: CommandOperationOptions,\n    ): Promise<any> {\n        return this.manager.dropCollectionIndex(\n            this.metadata.tableName,\n            indexName,\n            options,\n        )\n    }\n\n    /**\n     * Drops all indexes from the collection.\n     */\n    dropCollectionIndexes(): Promise<any> {\n        return this.manager.dropCollectionIndexes(this.metadata.tableName)\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    findOneAndDelete(\n        query: ObjectLiteral,\n        options?: FindOneAndDeleteOptions,\n    ): Promise<Document | null> {\n        return this.manager.findOneAndDelete(\n            this.metadata.tableName,\n            query,\n            options,\n        )\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    findOneAndReplace(\n        query: ObjectLiteral,\n        replacement: Object,\n        options?: FindOneAndReplaceOptions,\n    ): Promise<Document | null> {\n        return this.manager.findOneAndReplace(\n            this.metadata.tableName,\n            query,\n            replacement,\n            options,\n        )\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    findOneAndUpdate(\n        query: ObjectLiteral,\n        update: Object,\n        options?: FindOneAndUpdateOptions,\n    ): Promise<Document | null> {\n        return this.manager.findOneAndUpdate(\n            this.metadata.tableName,\n            query,\n            update,\n            options,\n        )\n    }\n\n    /**\n     * Retrieve all the indexes on the collection.\n     */\n    collectionIndexes(): Promise<any> {\n        return this.manager.collectionIndexes(this.metadata.tableName)\n    }\n\n    /**\n     * Retrieve all the indexes on the collection.\n     */\n    collectionIndexExists(indexes: string | string[]): Promise<boolean> {\n        return this.manager.collectionIndexExists(\n            this.metadata.tableName,\n            indexes,\n        )\n    }\n\n    /**\n     * Retrieves this collections index info.\n     */\n    collectionIndexInformation(options?: { full: boolean }): Promise<any> {\n        return this.manager.collectionIndexInformation(\n            this.metadata.tableName,\n            options,\n        )\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(options?: BulkWriteOptions): OrderedBulkOperation {\n        return this.manager.initializeOrderedBulkOp(\n            this.metadata.tableName,\n            options,\n        )\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(\n        options?: BulkWriteOptions,\n    ): UnorderedBulkOperation {\n        return this.manager.initializeUnorderedBulkOp(\n            this.metadata.tableName,\n            options,\n        )\n    }\n\n    /**\n     * Inserts an array of documents into MongoDB.\n     */\n    insertMany(\n        docs: ObjectLiteral[],\n        options?: BulkWriteOptions,\n    ): Promise<InsertManyResult<Document>> {\n        return this.manager.insertMany(this.metadata.tableName, docs, options)\n    }\n\n    /**\n     * Inserts a single document into MongoDB.\n     */\n    insertOne(\n        doc: ObjectLiteral,\n        options?: InsertOneOptions,\n    ): Promise<InsertOneResult> {\n        return this.manager.insertOne(this.metadata.tableName, doc, options)\n    }\n\n    /**\n     * Returns if the collection is a capped collection.\n     */\n    isCapped(): Promise<any> {\n        return this.manager.isCapped(this.metadata.tableName)\n    }\n\n    /**\n     * Get the list of all indexes information for the collection.\n     */\n    listCollectionIndexes(options?: ListIndexesOptions): ListIndexesCursor {\n        return this.manager.listCollectionIndexes(\n            this.metadata.tableName,\n            options,\n        )\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    rename(\n        newName: string,\n        options?: { dropTarget?: boolean },\n    ): Promise<Collection<Document>> {\n        return this.manager.rename(this.metadata.tableName, newName, options)\n    }\n\n    /**\n     * Replace a document on MongoDB.\n     */\n    replaceOne(\n        query: ObjectLiteral,\n        doc: ObjectLiteral,\n        options?: ReplaceOptions,\n    ): Promise<Document | UpdateResult> {\n        return this.manager.replaceOne(\n            this.metadata.tableName,\n            query,\n            doc,\n            options,\n        )\n    }\n\n    /**\n     * Get all the collection statistics.\n     */\n    stats(options?: CollStatsOptions): Promise<CollStats> {\n        return this.manager.stats(this.metadata.tableName, options)\n    }\n\n    /**\n     * Update multiple documents on MongoDB.\n     */\n    updateMany(\n        query: ObjectLiteral,\n        update: UpdateFilter<Document>,\n        options?: UpdateOptions,\n    ): Promise<Document | UpdateResult> {\n        return this.manager.updateMany(\n            this.metadata.tableName,\n            query,\n            update,\n            options,\n        )\n    }\n\n    /**\n     * Update a single document on MongoDB.\n     */\n    updateOne(\n        query: ObjectLiteral,\n        update: UpdateFilter<Document>,\n        options?: UpdateOptions,\n    ): Promise<Document | UpdateResult> {\n        return this.manager.updateOne(\n            this.metadata.tableName,\n            query,\n            update,\n            options,\n        )\n    }\n}\n"],"sourceRoot":".."}