{"version":3,"sources":["../src/backend/schema-kind-emptiness.ts"],"names":[],"mappings":";;;AAQA,eAAsB,mBAAA,CACpB,OAAA,EACA,OAAA,EACA,KAAA,EACiB;AACjB,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,cAAA,EAAgB,MAAM,IAAA,KAAS,YAAA;AAAA,IAC/B,YAAA,EACE,KAAA,CAAM,IAAA,KAAS,YAAA,GAAe,cAAA,GAAiB;AAAA,GACnD;AACA,EAAA,IAAI,KAAA,CAAM,WAAW,MAAA,EAAQ;AAC3B,IAAA,OAAO,OAAA,CAAQ,iBAAiB,EAAE,OAAA,EAAS,MAAM,KAAA,CAAM,IAAA,EAAM,GAAG,QAAA,EAAU,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,OAAA,CAAQ,iBAAiB,EAAE,OAAA,EAAS,MAAM,KAAA,CAAM,IAAA,EAAM,GAAG,QAAA,EAAU,CAAA;AAC5E","file":"chunk-6YKISECL.cjs","sourcesContent":["import type { GraphBackend, SchemaKindEmptinessProbe } from \"./types\";\n\ntype SchemaKindCountMembers = Pick<\n  GraphBackend,\n  \"countNodesByKind\" | \"countEdgesByKind\"\n>;\n\n/** Counts the explicitly selected row population for a schema transition. */\nexport async function countSchemaKindRows(\n  backend: SchemaKindCountMembers,\n  graphId: string,\n  probe: SchemaKindEmptinessProbe,\n): Promise<number> {\n  const rowScope = {\n    excludeDeleted: probe.rows === \"nonDeleted\",\n    temporalMode:\n      probe.rows === \"nonDeleted\" ? \"includeEnded\" : \"includeTombstones\",\n  } as const;\n  if (probe.entity === \"node\") {\n    return backend.countNodesByKind({ graphId, kind: probe.kind, ...rowScope });\n  }\n  return backend.countEdgesByKind({ graphId, kind: probe.kind, ...rowScope });\n}\n"]}