(table, values)
| 282 | await model.updateMany({ where, data: v.set }); |
| 283 | }, |
| 284 | async create(table, values) { |
| 285 | await init; |
| 286 | if (relationMode === "prisma") { |
| 287 | await Promise.all( |
| 288 | table.foreignKeys.map((key) => |
| 289 | checkForeignKeyOnInsert(this, key, [values]), |
| 290 | ), |
| 291 | ); |
| 292 | } |
| 293 | |
| 294 | values = mapValues(table, values, true); |
| 295 | const model = getPrismaModel(table); |
| 296 | return mapResult( |
| 297 | await model.create({ |
| 298 | data: values, |
| 299 | }), |
| 300 | table, |
| 301 | ); |
| 302 | }, |
| 303 | async createMany(table, values) { |
| 304 | await init; |
| 305 | const idField = table.getIdColumn().names.prisma; |
nothing calls this directly
no test coverage detected