{"version":3,"sources":["../src/indexes/profiler.ts","../src/indexes/where.ts"],"names":[],"mappings":";;;AAMO,SAAS,gBACd,KAAA,EACe;AACf,EAAA,OAAO;AAAA,IACL,YAAY,KAAA,CAAM,MAAA;AAAA,IAClB,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,MAAA,EAAQ,CAAC,GAAG,KAAA,CAAM,MAAM,CAAA;AAAA,IACxB,QAAQ,KAAA,CAAM,MAAA;AAAA,IACd,MAAM,KAAA,CAAM;AAAA,GACd;AACF;AASO,SAAS,kBACd,OAAA,EAC0B;AAC1B,EAAA,OAAO,OAAA,CACJ,MAAA;AAAA,IACC,CAAC,KAAA,KACC,KAAA,CAAM,MAAA,KAAW,MAAA,IAAU,MAAM,MAAA,KAAW;AAAA,IAE/C,GAAA,CAAI,CAAC,KAAA,KAAU,eAAA,CAAgB,KAAK,CAAC,CAAA;AAC1C;;;AChCO,SAAS,YACX,UAAA,EACmB;AACtB,EAAA,IAAI,UAAA,CAAW,WAAW,CAAA,EAAG;AAC3B,IAAA,OAAO,WAAW,CAAC,CAAA;AAAA,EACrB;AAEA,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,iBAAA;AAAA,IACR;AAAA,GACF;AACF;AAEO,SAAS,WACX,UAAA,EACmB;AACtB,EAAA,IAAI,UAAA,CAAW,WAAW,CAAA,EAAG;AAC3B,IAAA,OAAO,WAAW,CAAC,CAAA;AAAA,EACrB;AAEA,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,gBAAA;AAAA,IACR;AAAA,GACF;AACF;AAEO,SAAS,SACd,SAAA,EACsB;AACtB,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,iBAAA;AAAA,IACR;AAAA,GACF;AACF","file":"chunk-UA7PTC22.cjs","sourcesContent":["import { type DeclaredIndex } from \"../profiler/types\";\nimport {\n  type IndexDeclaration,\n  type RelationalIndexDeclaration,\n} from \"./types\";\n\nexport function toDeclaredIndex(\n  index: RelationalIndexDeclaration,\n): DeclaredIndex {\n  return {\n    entityType: index.entity,\n    kind: index.kind,\n    fields: [...index.fields],\n    unique: index.unique,\n    name: index.name,\n  };\n}\n\n/**\n * Vector indexes are excluded from the profiler-format conversion —\n * the profiler operates on relational tables (`typegraph_nodes` /\n * `typegraph_edges`) where index hits / misses can be measured against\n * SQL plans. Vector indexes live on the strategy's per-`(kind, field)`\n * embedding tables with a different access pattern.\n */\nexport function toDeclaredIndexes(\n  indexes: readonly IndexDeclaration[],\n): readonly DeclaredIndex[] {\n  return indexes\n    .filter(\n      (index): index is RelationalIndexDeclaration =>\n        index.entity === \"node\" || index.entity === \"edge\",\n    )\n    .map((index) => toDeclaredIndex(index));\n}\n","import { type IndexWhereExpression } from \"./types\";\n\nexport function andWhere(\n  ...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]\n): IndexWhereExpression {\n  if (predicates.length === 1) {\n    return predicates[0];\n  }\n\n  return {\n    __type: \"index_where_and\",\n    predicates,\n  };\n}\n\nexport function orWhere(\n  ...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]\n): IndexWhereExpression {\n  if (predicates.length === 1) {\n    return predicates[0];\n  }\n\n  return {\n    __type: \"index_where_or\",\n    predicates,\n  };\n}\n\nexport function notWhere(\n  predicate: IndexWhereExpression,\n): IndexWhereExpression {\n  return {\n    __type: \"index_where_not\",\n    predicate,\n  };\n}\n"]}