(table, values)
| 85 | return result?.[0]; |
| 86 | }, |
| 87 | async createMany(table, values) { |
| 88 | const results = await client.mutation(api.mutationHandler, { |
| 89 | tableName: table.ormName, |
| 90 | action: { |
| 91 | type: "create", |
| 92 | data: values, |
| 93 | returning: true, |
| 94 | }, |
| 95 | secret, |
| 96 | }); |
| 97 | |
| 98 | if (!results) throw new Error("Failed to create records."); |
| 99 | const idColumn = table.getIdColumn(); |
| 100 | return results.map((result: Record<string, unknown>) => ({ |
| 101 | _id: result[idColumn.ormName], |
| 102 | })); |
| 103 | }, |
| 104 | async deleteMany(table, v) { |
| 105 | await client.mutation(api.mutationHandler, { |
| 106 | tableName: table.names.sql, |
nothing calls this directly
no outgoing calls
no test coverage detected