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

Function count

packages/core/fumadb/src/adapters/memory/index.ts:136–138  ·  view source on GitHub ↗
(table, v)

Source from the content-addressed store, hash-verified

134 orm = toORM({
135 tables: schema.tables,
136 async count(table, v) {
137 return tableRows(db, table).filter((row) => matchesCondition(row, v.where)).length;
138 },
139 async findFirst(table, v) {
140 return (await this.findMany(table, { ...v, limit: 1 }))[0] ?? null;
141 },

Callers

nothing calls this directly

Calls 2

tableRowsFunction · 0.85
matchesConditionFunction · 0.85

Tested by

no test coverage detected