@inixiative/json-rules 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -556,6 +556,13 @@ type CheckOptions = {
556
556
  declare const check: <TData extends CheckData>(conditions: Condition, data: TData, options?: CheckOptions) => boolean | string;
557
557
 
558
558
  type PrismaProvider = 'postgresql' | 'mysql' | 'sqlite' | 'sqlserver' | 'cockroachdb' | 'mongodb';
559
+ /** The SQL dialects the engine writes. `toSql` writes PostgreSQL; `toWhereSql` writes the
560
+ * engine's `sql.dialect`. */
561
+ declare const SqlDialect: {
562
+ readonly postgres: "postgres";
563
+ readonly mysql: "mysql";
564
+ };
565
+ type SqlDialect = (typeof SqlDialect)[keyof typeof SqlDialect];
559
566
  type EngineGlobalsState = {
560
567
  string: {
561
568
  caseInsensitive: boolean;
@@ -569,12 +576,16 @@ type EngineGlobalsState = {
569
576
  * your installed @prisma/client's; set it only to use another. */
570
577
  anyNull?: unknown;
571
578
  };
579
+ sql: {
580
+ /** The dialect SQL-writing functions that take one emit (`toWhereSql`, `toLensWhereSql`). */
581
+ dialect: SqlDialect;
582
+ };
572
583
  };
573
584
  type DeepPartial<T> = {
574
585
  [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
575
586
  };
576
587
  /** Process-wide defaults, read and written by dotted path (`string.caseInsensitive`,
577
- * `string.fuzzy`, `prismaOptions.datasource.provider`, `prismaOptions.anyNull`). */
588
+ * `string.fuzzy`, `prismaOptions.datasource.provider`, `prismaOptions.anyNull`, `sql.dialect`). */
578
589
  declare const engineGlobals: {
579
590
  set: (path: string, value: unknown) => void;
580
591
  get: (path: string) => unknown;
@@ -1073,6 +1084,26 @@ declare const composeLens: (id: string, records: Record<string, StoredLens>) =>
1073
1084
  * named by `ids` in the same order. */
1074
1085
  declare const storeLens: (lens: Lens | LensNarrowing, ids: readonly string[]) => StoredLens[];
1075
1086
 
1087
+ type LensWhereSqlOptions = {
1088
+ /** Field path → the caller's SQL for that column, used as written. A path `where` reads
1089
+ * `'name'` at the root and `'<relation path>.<field>'` below it; a model default reads
1090
+ * `'<Model>.<field>'`. */
1091
+ columns: Record<string, string>;
1092
+ };
1093
+ /** A lens's `where`s as SQL, each where the lens wrote it. */
1094
+ type LensWhereSql = {
1095
+ /** The root path's `where`s, null when it has none. */
1096
+ root: string | null;
1097
+ /** Each relation path's own `where`s, keyed by the path. */
1098
+ relations: Record<string, string>;
1099
+ /** Each model default's `where`s (`mapDefaults[map].models[model].where`), keyed the same way:
1100
+ * one predicate per model however many paths reach it. */
1101
+ mapDefaults: Record<string, {
1102
+ models: Record<string, string>;
1103
+ }>;
1104
+ };
1105
+ declare const toLensWhereSql: (lens: Lens | LensNarrowing, { columns }: LensWhereSqlOptions) => LensWhereSql;
1106
+
1076
1107
  /** Gate a rule against a lens: every field and value-side ref resolves through it, and every
1077
1108
  * operator, value and amount fits the field it reaches. */
1078
1109
  declare const validateRuleInLens: (rule: Condition, lensOrNarrowing: Lens | LensNarrowing) => ValidationResult;
@@ -1190,6 +1221,25 @@ type ToSqlOptions = CompileOptions & {
1190
1221
  alias?: string;
1191
1222
  };
1192
1223
 
1224
+ type WhereSqlOptions = {
1225
+ /** Field path → the caller's SQL for that column, used as written. A to-one relation's
1226
+ * existence reads `'<relation>.<key>'`. */
1227
+ columns: Record<string, string>;
1228
+ /** The schema the condition reads: it types each literal by its column, finds a relation's key,
1229
+ * and refuses what has no form here (a date, Json or list value, a bridge, a to-many hop). */
1230
+ map: FieldMap | FieldMapSet;
1231
+ mapName?: string;
1232
+ model: string;
1233
+ };
1234
+ /**
1235
+ * A condition as a SQL predicate in the engine's `sql.dialect`, with every value written inline
1236
+ * and every field read from `columns` — no parameters to fill, no joins. Negations keep NULL rows,
1237
+ * as on every rail. Throws for any operator but equals / notEquals / in / notIn / exists /
1238
+ * notExists inside all / any, and for binds, bridges, column-to-column `path`s, a Json value or
1239
+ * existence, and a date or list value (their existence is fine: `IS NULL` compares no value).
1240
+ */
1241
+ declare const toWhereSql: (condition: Condition, options: WhereSqlOptions) => string;
1242
+
1193
1243
  /** Compile a condition to a SQL WHERE. With `lens`, the rule compiles narrowed by it, against its
1194
1244
  * base lens. */
1195
1245
  declare const toSql: (rule: Condition, compileOptions?: ToSqlOptions) => ToSqlResult;
@@ -1218,4 +1268,4 @@ declare const getConditionShapeKeys: (shape: ConditionShape) => ConditionShapeKe
1218
1268
  */
1219
1269
  declare const orderRecords: <T>(items: readonly T[], orderBy: OrderBy) => T[];
1220
1270
 
1221
- export { ALL_KINDS, type AggregateMode, type AggregateRule, type All, type Any, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type CheckData, type CheckOptions, type CompileOptions, type Condition, ConditionShape, type ConditionShapeKeys, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, type DateOffset, DateOperator, type DateRule, type DateRuleValue, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensClamps, type LensNarrowing, type LensPathHop, type LensPathResolution, LensRefusal, type LensRelationSelect, type LensSelect, type LensSelectOptions, type LensValue, type ListBindingsOptions, type Magnitude, type MaterializeSourceQueryOptions, type ModelDefaultNarrowing, type ModelEntry, type ModelNarrowing, NUMERIC_KINDS, type NarrowingDefaults, type NumberOffset, Operator, type OperatorFamily, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectLensOptions, type ProjectRowsOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Row, type Rule, type RuleDescription, type RuleScalar, type RuleSourceDescription, RuleTarget, type RuleValue, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceEntry, type SourceOption, SourceOptionOrder, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSelect, type SourceSpec, type SourceSqlQuery, type SourceValues, type StepRef, type StoredLens, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaOptions, type ToPrismaResult, type ToSqlOptions, type ToSqlResult, UsageError, type ValidateRuleOptions, type ValidationIssue, type ValidationResult, ValueShape, type ValueSourceFields, type ValueSourceOf, type WeekStart, type WhereStep, type WindowFields, andWhere, assertValidFieldMaps, assertValidNarrowing, assertValidRule, bindLens, bindRule, check, clampLens, coerceRule, composeLens, createLens, describeRule, describeRuleSources, engineGlobals, executePrismaPlan, getAggregateOperators, getArrayOperators, getConditionShapeKeys, getLensRoot, getOperatorsForKind, getValueShape, indexBridges, lensVisit, listBindings, listLensBindings, matchAll, matchNothing, materializeSourceQuery, materializeSources, narrowRule, orWhere, orderRecords, parseScopeRef, projectLens, projectRows, readLensValue, readScopeRef, stitchFieldMaps, storeLens, toLensSelect, toPrisma, toSourceQueries, toSql, validateFieldMaps, validateNarrowing, validateRule, validateRuleInLens, walkLensPath };
1271
+ export { ALL_KINDS, type AggregateMode, type AggregateRule, type All, type Any, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type CheckData, type CheckOptions, type CompileOptions, type Condition, ConditionShape, type ConditionShapeKeys, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, type DateOffset, DateOperator, type DateRule, type DateRuleValue, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensClamps, type LensNarrowing, type LensPathHop, type LensPathResolution, LensRefusal, type LensRelationSelect, type LensSelect, type LensSelectOptions, type LensValue, type LensWhereSql, type LensWhereSqlOptions, type ListBindingsOptions, type Magnitude, type MaterializeSourceQueryOptions, type ModelDefaultNarrowing, type ModelEntry, type ModelNarrowing, NUMERIC_KINDS, type NarrowingDefaults, type NumberOffset, Operator, type OperatorFamily, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectLensOptions, type ProjectRowsOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Row, type Rule, type RuleDescription, type RuleScalar, type RuleSourceDescription, RuleTarget, type RuleValue, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceEntry, type SourceOption, SourceOptionOrder, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSelect, type SourceSpec, type SourceSqlQuery, type SourceValues, SqlDialect, type StepRef, type StoredLens, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaOptions, type ToPrismaResult, type ToSqlOptions, type ToSqlResult, UsageError, type ValidateRuleOptions, type ValidationIssue, type ValidationResult, ValueShape, type ValueSourceFields, type ValueSourceOf, type WeekStart, type WhereSqlOptions, type WhereStep, type WindowFields, andWhere, assertValidFieldMaps, assertValidNarrowing, assertValidRule, bindLens, bindRule, check, clampLens, coerceRule, composeLens, createLens, describeRule, describeRuleSources, engineGlobals, executePrismaPlan, getAggregateOperators, getArrayOperators, getConditionShapeKeys, getLensRoot, getOperatorsForKind, getValueShape, indexBridges, lensVisit, listBindings, listLensBindings, matchAll, matchNothing, materializeSourceQuery, materializeSources, narrowRule, orWhere, orderRecords, parseScopeRef, projectLens, projectRows, readLensValue, readScopeRef, stitchFieldMaps, storeLens, toLensSelect, toLensWhereSql, toPrisma, toSourceQueries, toSql, toWhereSql, validateFieldMaps, validateNarrowing, validateRule, validateRuleInLens, walkLensPath };
package/dist/index.d.ts CHANGED
@@ -556,6 +556,13 @@ type CheckOptions = {
556
556
  declare const check: <TData extends CheckData>(conditions: Condition, data: TData, options?: CheckOptions) => boolean | string;
557
557
 
558
558
  type PrismaProvider = 'postgresql' | 'mysql' | 'sqlite' | 'sqlserver' | 'cockroachdb' | 'mongodb';
559
+ /** The SQL dialects the engine writes. `toSql` writes PostgreSQL; `toWhereSql` writes the
560
+ * engine's `sql.dialect`. */
561
+ declare const SqlDialect: {
562
+ readonly postgres: "postgres";
563
+ readonly mysql: "mysql";
564
+ };
565
+ type SqlDialect = (typeof SqlDialect)[keyof typeof SqlDialect];
559
566
  type EngineGlobalsState = {
560
567
  string: {
561
568
  caseInsensitive: boolean;
@@ -569,12 +576,16 @@ type EngineGlobalsState = {
569
576
  * your installed @prisma/client's; set it only to use another. */
570
577
  anyNull?: unknown;
571
578
  };
579
+ sql: {
580
+ /** The dialect SQL-writing functions that take one emit (`toWhereSql`, `toLensWhereSql`). */
581
+ dialect: SqlDialect;
582
+ };
572
583
  };
573
584
  type DeepPartial<T> = {
574
585
  [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
575
586
  };
576
587
  /** Process-wide defaults, read and written by dotted path (`string.caseInsensitive`,
577
- * `string.fuzzy`, `prismaOptions.datasource.provider`, `prismaOptions.anyNull`). */
588
+ * `string.fuzzy`, `prismaOptions.datasource.provider`, `prismaOptions.anyNull`, `sql.dialect`). */
578
589
  declare const engineGlobals: {
579
590
  set: (path: string, value: unknown) => void;
580
591
  get: (path: string) => unknown;
@@ -1073,6 +1084,26 @@ declare const composeLens: (id: string, records: Record<string, StoredLens>) =>
1073
1084
  * named by `ids` in the same order. */
1074
1085
  declare const storeLens: (lens: Lens | LensNarrowing, ids: readonly string[]) => StoredLens[];
1075
1086
 
1087
+ type LensWhereSqlOptions = {
1088
+ /** Field path → the caller's SQL for that column, used as written. A path `where` reads
1089
+ * `'name'` at the root and `'<relation path>.<field>'` below it; a model default reads
1090
+ * `'<Model>.<field>'`. */
1091
+ columns: Record<string, string>;
1092
+ };
1093
+ /** A lens's `where`s as SQL, each where the lens wrote it. */
1094
+ type LensWhereSql = {
1095
+ /** The root path's `where`s, null when it has none. */
1096
+ root: string | null;
1097
+ /** Each relation path's own `where`s, keyed by the path. */
1098
+ relations: Record<string, string>;
1099
+ /** Each model default's `where`s (`mapDefaults[map].models[model].where`), keyed the same way:
1100
+ * one predicate per model however many paths reach it. */
1101
+ mapDefaults: Record<string, {
1102
+ models: Record<string, string>;
1103
+ }>;
1104
+ };
1105
+ declare const toLensWhereSql: (lens: Lens | LensNarrowing, { columns }: LensWhereSqlOptions) => LensWhereSql;
1106
+
1076
1107
  /** Gate a rule against a lens: every field and value-side ref resolves through it, and every
1077
1108
  * operator, value and amount fits the field it reaches. */
1078
1109
  declare const validateRuleInLens: (rule: Condition, lensOrNarrowing: Lens | LensNarrowing) => ValidationResult;
@@ -1190,6 +1221,25 @@ type ToSqlOptions = CompileOptions & {
1190
1221
  alias?: string;
1191
1222
  };
1192
1223
 
1224
+ type WhereSqlOptions = {
1225
+ /** Field path → the caller's SQL for that column, used as written. A to-one relation's
1226
+ * existence reads `'<relation>.<key>'`. */
1227
+ columns: Record<string, string>;
1228
+ /** The schema the condition reads: it types each literal by its column, finds a relation's key,
1229
+ * and refuses what has no form here (a date, Json or list value, a bridge, a to-many hop). */
1230
+ map: FieldMap | FieldMapSet;
1231
+ mapName?: string;
1232
+ model: string;
1233
+ };
1234
+ /**
1235
+ * A condition as a SQL predicate in the engine's `sql.dialect`, with every value written inline
1236
+ * and every field read from `columns` — no parameters to fill, no joins. Negations keep NULL rows,
1237
+ * as on every rail. Throws for any operator but equals / notEquals / in / notIn / exists /
1238
+ * notExists inside all / any, and for binds, bridges, column-to-column `path`s, a Json value or
1239
+ * existence, and a date or list value (their existence is fine: `IS NULL` compares no value).
1240
+ */
1241
+ declare const toWhereSql: (condition: Condition, options: WhereSqlOptions) => string;
1242
+
1193
1243
  /** Compile a condition to a SQL WHERE. With `lens`, the rule compiles narrowed by it, against its
1194
1244
  * base lens. */
1195
1245
  declare const toSql: (rule: Condition, compileOptions?: ToSqlOptions) => ToSqlResult;
@@ -1218,4 +1268,4 @@ declare const getConditionShapeKeys: (shape: ConditionShape) => ConditionShapeKe
1218
1268
  */
1219
1269
  declare const orderRecords: <T>(items: readonly T[], orderBy: OrderBy) => T[];
1220
1270
 
1221
- export { ALL_KINDS, type AggregateMode, type AggregateRule, type All, type Any, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type CheckData, type CheckOptions, type CompileOptions, type Condition, ConditionShape, type ConditionShapeKeys, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, type DateOffset, DateOperator, type DateRule, type DateRuleValue, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensClamps, type LensNarrowing, type LensPathHop, type LensPathResolution, LensRefusal, type LensRelationSelect, type LensSelect, type LensSelectOptions, type LensValue, type ListBindingsOptions, type Magnitude, type MaterializeSourceQueryOptions, type ModelDefaultNarrowing, type ModelEntry, type ModelNarrowing, NUMERIC_KINDS, type NarrowingDefaults, type NumberOffset, Operator, type OperatorFamily, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectLensOptions, type ProjectRowsOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Row, type Rule, type RuleDescription, type RuleScalar, type RuleSourceDescription, RuleTarget, type RuleValue, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceEntry, type SourceOption, SourceOptionOrder, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSelect, type SourceSpec, type SourceSqlQuery, type SourceValues, type StepRef, type StoredLens, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaOptions, type ToPrismaResult, type ToSqlOptions, type ToSqlResult, UsageError, type ValidateRuleOptions, type ValidationIssue, type ValidationResult, ValueShape, type ValueSourceFields, type ValueSourceOf, type WeekStart, type WhereStep, type WindowFields, andWhere, assertValidFieldMaps, assertValidNarrowing, assertValidRule, bindLens, bindRule, check, clampLens, coerceRule, composeLens, createLens, describeRule, describeRuleSources, engineGlobals, executePrismaPlan, getAggregateOperators, getArrayOperators, getConditionShapeKeys, getLensRoot, getOperatorsForKind, getValueShape, indexBridges, lensVisit, listBindings, listLensBindings, matchAll, matchNothing, materializeSourceQuery, materializeSources, narrowRule, orWhere, orderRecords, parseScopeRef, projectLens, projectRows, readLensValue, readScopeRef, stitchFieldMaps, storeLens, toLensSelect, toPrisma, toSourceQueries, toSql, validateFieldMaps, validateNarrowing, validateRule, validateRuleInLens, walkLensPath };
1271
+ export { ALL_KINDS, type AggregateMode, type AggregateRule, type All, type Any, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type CheckData, type CheckOptions, type CompileOptions, type Condition, ConditionShape, type ConditionShapeKeys, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, type DateOffset, DateOperator, type DateRule, type DateRuleValue, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensClamps, type LensNarrowing, type LensPathHop, type LensPathResolution, LensRefusal, type LensRelationSelect, type LensSelect, type LensSelectOptions, type LensValue, type LensWhereSql, type LensWhereSqlOptions, type ListBindingsOptions, type Magnitude, type MaterializeSourceQueryOptions, type ModelDefaultNarrowing, type ModelEntry, type ModelNarrowing, NUMERIC_KINDS, type NarrowingDefaults, type NumberOffset, Operator, type OperatorFamily, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectLensOptions, type ProjectRowsOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Row, type Rule, type RuleDescription, type RuleScalar, type RuleSourceDescription, RuleTarget, type RuleValue, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceEntry, type SourceOption, SourceOptionOrder, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSelect, type SourceSpec, type SourceSqlQuery, type SourceValues, SqlDialect, type StepRef, type StoredLens, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaOptions, type ToPrismaResult, type ToSqlOptions, type ToSqlResult, UsageError, type ValidateRuleOptions, type ValidationIssue, type ValidationResult, ValueShape, type ValueSourceFields, type ValueSourceOf, type WeekStart, type WhereSqlOptions, type WhereStep, type WindowFields, andWhere, assertValidFieldMaps, assertValidNarrowing, assertValidRule, bindLens, bindRule, check, clampLens, coerceRule, composeLens, createLens, describeRule, describeRuleSources, engineGlobals, executePrismaPlan, getAggregateOperators, getArrayOperators, getConditionShapeKeys, getLensRoot, getOperatorsForKind, getValueShape, indexBridges, lensVisit, listBindings, listLensBindings, matchAll, matchNothing, materializeSourceQuery, materializeSources, narrowRule, orWhere, orderRecords, parseScopeRef, projectLens, projectRows, readLensValue, readScopeRef, stitchFieldMaps, storeLens, toLensSelect, toLensWhereSql, toPrisma, toSourceQueries, toSql, toWhereSql, validateFieldMaps, validateNarrowing, validateRule, validateRuleInLens, walkLensPath };