Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export class TypeORMStorageBackend extends backend.StorageBackend {
return { object: this.readObjectCleaner(savedObject, { collectionDefinition }) }
}

async rawCreateObjects(collection : string, objects : any[], options: backend.CreateManyOptions & InternalOperationOptions): Promise<backend.CreateManyResult> {
const { repository, collectionDefinition } = this._preprocessOperation(collection, options)
const savedObjects = await repository.save(objects)
return { objects: savedObjects }
}

async findObjects<T>(collection : string, where : any, options: backend.FindManyOptions = {}): Promise<Array<T>> {
const { collectionDefinition, queryBuilderWithWhere } = this._preprocessFilteredOperation(collection, where, options)
const objects = await queryBuilderWithWhere
Expand Down