MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createMany

Function createMany

packages/core/fumadb/src/convex/query.ts:87–103  ·  view source on GitHub ↗
(table, values)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected