(options?: Partial<TOptions>)
| 16 | } |
| 17 | |
| 18 | async create(options?: Partial<TOptions>): Promise<TResult> { |
| 19 | if (!this.adapter) { |
| 20 | throw new Error('Cannot create without a persistence adapter. Use build() for in-memory objects.'); |
| 21 | } |
| 22 | const data = this.build(options); |
| 23 | return await this.adapter.insert(this.entityType, data) as Promise<TResult>; |
| 24 | } |
| 25 | |
| 26 | async createMany(optionsList: Partial<TOptions>[]): Promise<TResult[]> { |
| 27 | if (!this.adapter) { |
no test coverage detected
searching dependent graphs…