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

Function findFirst

packages/core/fumadb/src/query/orm/index.ts:404–414  ·  view source on GitHub ↗
(name, options)

Source from the content-addressed store, hash-verified

402 return records;
403 },
404 async findFirst(name, options) {
405 const table = toTable(name);
406 let compiledOptions = buildFindOptions(table, options as FindFirstOptions);
407 if (compiledOptions === false) return null;
408
409 compiledOptions = await applyReadPoliciesToOptions(table, compiledOptions, context);
410 if (compiledOptions === false) return null;
411 const record = await internal.findFirst(table, compiledOptions);
412 if (record) applyDeniedJoinDefaults([record], compiledOptions);
413 return record;
414 },
415 async updateMany(name, { set, where }) {
416 const table = toTable(name);
417 let conditions = where ? buildCondition(table.columns, where) : undefined;

Callers

nothing calls this directly

Calls 4

toTableFunction · 0.85
buildFindOptionsFunction · 0.85
applyDeniedJoinDefaultsFunction · 0.85

Tested by

no test coverage detected