(table, v)
| 29 | })) as number; |
| 30 | }, |
| 31 | async findFirst(table, v) { |
| 32 | const result = await client.query(api.queryHandler, { |
| 33 | tableName: table.ormName, |
| 34 | query: { |
| 35 | type: "find", |
| 36 | select: serializeSelect(table, v.select), |
| 37 | where: v.where ? serializeWhere(v.where) : undefined, |
| 38 | limit: 1, |
| 39 | }, |
| 40 | secret, |
| 41 | }); |
| 42 | |
| 43 | if (Array.isArray(result) && result.length > 0) |
| 44 | return result[0] as Record<string, unknown>; |
| 45 | return null; |
| 46 | }, |
| 47 | async findMany(table, v) { |
| 48 | const result = await client.query(api.queryHandler, { |
| 49 | tableName: table.ormName, |
nothing calls this directly
no test coverage detected