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

Function count

packages/core/fumadb/src/adapters/prisma/query.ts:242–254  ·  view source on GitHub ↗
(table, v)

Source from the content-addressed store, hash-verified

240 return toORM({
241 tables: schema.tables,
242 async count(table, v) {
243 await init;
244 const model = getPrismaModel(table);
245
246 return (
247 await model.count({
248 select: {
249 _all: true,
250 },
251 where: v.where ? buildWhere(v.where) : undefined,
252 })
253 )._all;
254 },
255 async findFirst(table, v) {
256 await init;
257 const model = getPrismaModel(table);

Callers

nothing calls this directly

Calls 3

getPrismaModelFunction · 0.85
countMethod · 0.80
buildWhereFunction · 0.70

Tested by

no test coverage detected