(table, v)
| 253 | )._all; |
| 254 | }, |
| 255 | async findFirst(table, v) { |
| 256 | await init; |
| 257 | const model = getPrismaModel(table); |
| 258 | const options = createFindOptions(table, v); |
| 259 | delete options.take; |
| 260 | |
| 261 | const result = await model.findFirst({ |
| 262 | ...options, |
| 263 | where: options.where!, |
| 264 | }); |
| 265 | if (result) return mapResult(result, table); |
| 266 | |
| 267 | return null; |
| 268 | }, |
| 269 | async findMany(table, v) { |
| 270 | await init; |
| 271 | const model = getPrismaModel(table); |
nothing calls this directly
no test coverage detected