@atscript/db 0.1.128 → 0.1.130

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.
Files changed (39) hide show
  1. package/dist/agg.cjs +31 -0
  2. package/dist/agg.d.cts +30 -1
  3. package/dist/agg.d.mts +30 -1
  4. package/dist/agg.mjs +31 -1
  5. package/dist/{db-error-DXwEzmYJ.cjs → db-error-C4JuLcvb.cjs} +27 -0
  6. package/dist/{db-error-BHPXOKzc.mjs → db-error-COrO58t5.mjs} +22 -1
  7. package/dist/{db-readable-CkbZn_z-.d.cts → db-readable-B7eYWS5q.d.cts} +10 -1
  8. package/dist/{db-readable-BTl4NzNN.d.mts → db-readable-Bn1bV_eC.d.mts} +10 -1
  9. package/dist/{db-space-BEB5Jl8M.d.mts → db-space-C2UCnGHd.d.cts} +28 -2
  10. package/dist/{db-space-BevOyVrC.d.cts → db-space-DdIPYD0Q.d.mts} +28 -2
  11. package/dist/{db-view-Ck0I-PMI.mjs → db-view-BkF2xEGd.mjs} +98 -8
  12. package/dist/{db-view-C8-MsjND.cjs → db-view-hkwQ-fHJ.cjs} +98 -8
  13. package/dist/index.cjs +4 -3
  14. package/dist/index.d.cts +4 -4
  15. package/dist/index.d.mts +4 -4
  16. package/dist/index.mjs +4 -4
  17. package/dist/{nested-writer-DI-HeTky.mjs → nested-writer-CkDo-ZfH.mjs} +1 -1
  18. package/dist/{nested-writer-DoDhl3X3.cjs → nested-writer-DxPhmWFz.cjs} +1 -1
  19. package/dist/ops.cjs +1 -1
  20. package/dist/ops.mjs +1 -1
  21. package/dist/rel.cjs +2 -2
  22. package/dist/rel.d.cts +1 -1
  23. package/dist/rel.d.mts +1 -1
  24. package/dist/rel.mjs +2 -2
  25. package/dist/{relation-loader-BnUgJsUG.cjs → relation-loader-C8GOpNYJ.cjs} +1 -1
  26. package/dist/{relation-loader-BmeOMj0b.mjs → relation-loader-CUGcxJ18.mjs} +1 -1
  27. package/dist/sync.cjs +280 -143
  28. package/dist/sync.d.cts +24 -6
  29. package/dist/sync.d.mts +24 -6
  30. package/dist/sync.mjs +280 -143
  31. package/dist/{validator-eKYWf3xf.mjs → validator-CeD_fqyW.mjs} +1 -1
  32. package/dist/{validator-BNUHCXIE.cjs → validator-lkCJKuoo.cjs} +1 -1
  33. package/dist/{validator-DuAmWc8L.d.cts → validator-wBARmD68.d.cts} +21 -2
  34. package/dist/{validator-DuAmWc8L.d.mts → validator-wBARmD68.d.mts} +21 -2
  35. package/dist/validator.cjs +2 -2
  36. package/dist/validator.d.cts +1 -1
  37. package/dist/validator.d.mts +1 -1
  38. package/dist/validator.mjs +2 -2
  39. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- const require_db_error = require("./db-error-DXwEzmYJ.cjs");
2
- const require_validator = require("./validator-BNUHCXIE.cjs");
1
+ const require_db_error = require("./db-error-C4JuLcvb.cjs");
2
+ const require_validator = require("./validator-lkCJKuoo.cjs");
3
3
  const require_agg = require("./agg.cjs");
4
- const require_nested_writer = require("./nested-writer-DoDhl3X3.cjs");
4
+ const require_nested_writer = require("./nested-writer-DxPhmWFz.cjs");
5
5
  const require_ops = require("./ops.cjs");
6
6
  let _atscript_typescript_utils = require("@atscript/typescript/utils");
7
7
  let node_async_hooks = require("node:async_hooks");
@@ -1027,13 +1027,11 @@ var RelationalFieldMapper = class extends FieldMappingStrategy {
1027
1027
  return {
1028
1028
  filter,
1029
1029
  controls: {
1030
+ ...controls,
1030
1031
  $groupBy: groupBy,
1031
1032
  $select: select ? new UniquSelect(select, meta.allPhysicalFields) : void 0,
1032
1033
  $sort: sort,
1033
- $having: having,
1034
- $skip: controls.$skip,
1035
- $limit: controls.$limit,
1036
- $count: controls.$count
1034
+ $having: having
1037
1035
  },
1038
1036
  insights: query.insights
1039
1037
  };
@@ -2047,6 +2045,11 @@ var AtscriptDbReadable = class {
2047
2045
  }]);
2048
2046
  }
2049
2047
  }
2048
+ const searchTerm = query.controls.$search;
2049
+ if (typeof searchTerm === "string" && searchTerm) {
2050
+ this._ensureSearchable();
2051
+ if (!searchTerm.trim()) return query.controls.$count ? [{ count: 0 }] : [];
2052
+ }
2050
2053
  guardAggregate(this._meta, this.adapter, query);
2051
2054
  const dbQuery = this._fieldMapper.translateAggregateQuery(query, this._meta);
2052
2055
  return (await this.adapter.aggregate(dbQuery)).map((row) => this._fieldMapper.reconstructFromRead(row, this._meta));
@@ -2345,7 +2348,7 @@ var AtscriptDbReadable = class {
2345
2348
  * Public entry point for relation loading. Used by adapters for nested $with delegation.
2346
2349
  */
2347
2350
  async loadRelations(rows, withRelations) {
2348
- const { loadRelationsImpl } = await Promise.resolve().then(() => require("./relation-loader-BnUgJsUG.cjs")).then((n) => n.relation_loader_exports);
2351
+ const { loadRelationsImpl } = await Promise.resolve().then(() => require("./relation-loader-C8GOpNYJ.cjs")).then((n) => n.relation_loader_exports);
2349
2352
  return loadRelationsImpl(rows, withRelations, this);
2350
2353
  }
2351
2354
  /**
@@ -3504,6 +3507,15 @@ function _translateOpsKeys(ops, meta) {
3504
3507
  mul: ops.mul ? _translateOpsRecord(ops.mul, meta) : void 0
3505
3508
  };
3506
3509
  }
3510
+ /** Upper bound of keys per `touchMany` UPDATE statement (parameter-count safety). */
3511
+ const TOUCH_MANY_CHUNK = 500;
3512
+ /** `touchMany` input rejection — always `INVALID_QUERY`, path names the key. */
3513
+ function invalidTouchKey(path, message) {
3514
+ return new require_db_error.DbError("INVALID_QUERY", [{
3515
+ path,
3516
+ message
3517
+ }]);
3518
+ }
3507
3519
  var AtscriptDbTable = class extends AtscriptDbReadable {
3508
3520
  _cascadeResolver;
3509
3521
  _fkLookupResolver;
@@ -3783,6 +3795,84 @@ var AtscriptDbTable = class extends AtscriptDbReadable {
3783
3795
  }));
3784
3796
  }
3785
3797
  /**
3798
+ * Batch versioned touch (since 0.1.129): bumps the version of every listed
3799
+ * row by exactly one, each row guarded by its own expected version. This is
3800
+ * the batch fence `updateMany(orFilter, {})` used to be before 0.1.128 (an
3801
+ * empty patch is a no-op since then and takes no lock).
3802
+ *
3803
+ * Each key carries the primary key field(s) (composite supported) plus the
3804
+ * version column and NOTHING else — a touch has no payload. Unique indexes
3805
+ * do not identify a touch key. `undefined`-valued properties are ignored,
3806
+ * like in every write payload. Empty `keys` → `{ 0, 0 }` without a statement.
3807
+ *
3808
+ * `require: 'all'` (default): one count over the whole key set runs FIRST;
3809
+ * a stale or missing row throws {@link CasMismatchError} before any write.
3810
+ * The bumps then run as `updateMany(orFilter, {})` chunks of at most
3811
+ * {@link TOUCH_MANY_CHUNK} keys inside one adapter transaction; a summed
3812
+ * `matchedCount` short of `keys.length` (a row moved between the count and
3813
+ * the bump) throws the same error — SQL engines roll every bump back. The
3814
+ * pre-count is therefore a deliberate double check on SQL: it is what makes
3815
+ * the guarantee hold on adapters whose `withTransaction` is a passthrough
3816
+ * (the memory adapter, a Mongo standalone topology) — there it covers the
3817
+ * common stale case and the residual race window is accepted.
3818
+ * `require: 'any'`: no pre-count, the honest summed result is returned.
3819
+ *
3820
+ * No `guard`, no `onWrite`; not exposed over HTTP.
3821
+ */
3822
+ async touchMany(keys, opts) {
3823
+ this._ensureBuilt();
3824
+ const versionField = this._meta.versionField;
3825
+ if (versionField === void 0) throw invalidTouchKey("", "touchMany requires @db.column.version");
3826
+ if (keys.length === 0) return {
3827
+ matchedCount: 0,
3828
+ modifiedCount: 0
3829
+ };
3830
+ const pkFields = this.primaryKeys;
3831
+ const seen = /* @__PURE__ */ new Set();
3832
+ const pairs = [];
3833
+ for (const [i, key] of keys.entries()) {
3834
+ const pair = {};
3835
+ for (const pk of pkFields) {
3836
+ if (key[pk] === void 0) throw invalidTouchKey(`[${i}].${pk}`, `touchMany: each key must carry its "${pk}"`);
3837
+ pair[pk] = key[pk];
3838
+ }
3839
+ const version = key[versionField];
3840
+ if (typeof version !== "number" || !Number.isFinite(version)) throw invalidTouchKey(`[${i}].${versionField}`, `touchMany: each key must carry its expected "${versionField}" (number)`);
3841
+ for (const [prop, value] of Object.entries(key)) if (value !== void 0 && prop !== versionField && !(prop in pair)) throw invalidTouchKey(`[${i}].${prop}`, `touchMany: a touch carries no payload — keys hold the primary key and "${versionField}" only, got "${prop}"`);
3842
+ const identity = JSON.stringify(pair);
3843
+ if (seen.has(identity)) throw invalidTouchKey(`[${i}]`, `touchMany: duplicate key ${identity}`);
3844
+ seen.add(identity);
3845
+ pair[versionField] = version;
3846
+ pairs.push(pair);
3847
+ }
3848
+ const orFilter = { $or: pairs };
3849
+ this._guardMutationFilter(orFilter);
3850
+ const translated = this._fieldMapper.translateFilter(orFilter, this._meta).$or;
3851
+ const requireAll = (opts?.require ?? "all") === "all";
3852
+ if (requireAll) {
3853
+ const matched = await this.adapter.count({
3854
+ filter: { $or: translated },
3855
+ controls: {}
3856
+ });
3857
+ if (matched < keys.length) throw new require_db_error.CasMismatchError(matched, keys.length);
3858
+ }
3859
+ return this.adapter.withTransaction(async () => {
3860
+ let matchedCount = 0;
3861
+ let modifiedCount = 0;
3862
+ for (let start = 0; start < translated.length; start += TOUCH_MANY_CHUNK) {
3863
+ const chunk = translated.slice(start, start + TOUCH_MANY_CHUNK);
3864
+ const result = await this.adapter.updateMany({ $or: chunk }, {}, void 0);
3865
+ matchedCount += result.matchedCount;
3866
+ modifiedCount += result.modifiedCount;
3867
+ }
3868
+ if (requireAll && matchedCount !== keys.length) throw new require_db_error.CasMismatchError(matchedCount, keys.length);
3869
+ return {
3870
+ matchedCount,
3871
+ modifiedCount
3872
+ };
3873
+ });
3874
+ }
3875
+ /**
3786
3876
  * Deletes a single record by any type-compatible identifier — primary key
3787
3877
  * or single-field unique index. Uses the same resolution logic as `findById`.
3788
3878
  *
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_db_error = require("./db-error-DXwEzmYJ.cjs");
3
- const require_db_view = require("./db-view-C8-MsjND.cjs");
4
- const require_validator = require("./validator-BNUHCXIE.cjs");
2
+ const require_db_error = require("./db-error-C4JuLcvb.cjs");
3
+ const require_db_view = require("./db-view-hkwQ-fHJ.cjs");
4
+ const require_validator = require("./validator-lkCJKuoo.cjs");
5
5
  const require_consts = require("./consts-BzRfCcH2.cjs");
6
6
  const require_ops = require("./ops.cjs");
7
7
  let node_crypto = require("node:crypto");
@@ -388,6 +388,7 @@ exports.AtscriptDbTable = require_db_view.AtscriptDbTable;
388
388
  exports.AtscriptDbView = require_db_view.AtscriptDbView;
389
389
  exports.BaseDbAdapter = require_db_view.BaseDbAdapter;
390
390
  exports.CasExhaustedError = require_db_error.CasExhaustedError;
391
+ exports.CasMismatchError = require_db_error.CasMismatchError;
391
392
  exports.DEFAULT_DB_SPACE = require_consts.DEFAULT_DB_SPACE;
392
393
  exports.DbEncryption = DbEncryption;
393
394
  exports.DbError = require_db_error.DbError;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as TDbWriteAction, A as TCrudPermissions, At as isGeoIndexableType, B as TDbForeignKey, C as NullableOptional, Ct as TWriteTableResolver, D as TCascadeTarget, Dt as WithRelation, E as TCascadeResolver, Et as UniqueryControls, F as TDbCollation, G as TDbInsertResult, H as TDbIndexField, I as TDbDefaultFn, J as TDbRelation, K as TDbObjectKind, L as TDbDefaultValue, M as TDbActionIntent, Mt as NoopLogger, N as TDbActionLevel, Nt as TGenericLogger, O as TColumnDiff, Ot as TableMetadata, P as TDbActionProcessor, Pt as UniquSelect, Q as TDbUpdateResult, R as TDbDeleteResult, S as NavPropsOf, St as TWriteOptions, T as PrimaryKeyOf, Tt as Uniquery, U as TDbIndexType, V as TDbIndex, W as TDbInsertManyResult, X as TDbRemoveGuardContext, Y as TDbRemoveGuard, Z as TDbStorageType, _ as DbQuery, _t as TSearchIndexInfo, a as TDbEncryptionOptions, at as TExistingForeignKey, b as FilterExpr, bt as TTableResolver, c as BaseDbAdapter, ct as TFkLookupResolver, d as AggregateFn, dt as TIdentification, et as TDbWriteGuard, f as AggregateQuery, ft as TMetaResponse, g as DbPatch, gt as TRelationInfo, h as DbControls, ht as TReferencingForeignKey, i as DbEncryption, it as TExistingColumn, j as TDbActionInfo, jt as isGeoPointType, k as TCrudOp, kt as findAncestorInSet, l as AggregateControls, lt as TFkLookupTarget, m as AtscriptDbWritable, mt as TPrimaryKeyChange, n as DbResponse, nt as TDeleteOptions, o as DocumentFieldMapper, ot as TExistingTableOption, p as AggregateResult, pt as TMetadataOverrides, q as TDbReferentialAction, r as resolveDesignType, rt as TEnsureTableOptions, s as FieldMappingStrategy, st as TFieldMeta, t as AtscriptDbReadable, tt as TDbWriteGuardContext, u as AggregateExpr, ut as TIdDescriptor, v as DbRow, vt as TSyncColumnResult, w as OwnPropsOf, wt as TypedWithRelation, x as FlatOf, xt as TValueFormatterPair, y as FieldOpsFor, yt as TTableOptionDiff, z as TDbFieldMeta } from "./db-readable-CkbZn_z-.cjs";
1
+ import { $ as TDbWriteAction, A as TCrudPermissions, At as findAncestorInSet, B as TDbForeignKey, C as NullableOptional, Ct as TWriteOptions, D as TCascadeTarget, Dt as UniqueryControls, E as TCascadeResolver, Et as Uniquery, F as TDbCollation, Ft as UniquSelect, G as TDbInsertResult, H as TDbIndexField, I as TDbDefaultFn, J as TDbRelation, K as TDbObjectKind, L as TDbDefaultValue, M as TDbActionIntent, Mt as isGeoPointType, N as TDbActionLevel, Nt as NoopLogger, O as TColumnDiff, Ot as WithRelation, P as TDbActionProcessor, Pt as TGenericLogger, Q as TDbUpdateResult, R as TDbDeleteResult, S as NavPropsOf, St as TValueFormatterPair, T as PrimaryKeyOf, Tt as TypedWithRelation, U as TDbIndexType, V as TDbIndex, W as TDbInsertManyResult, X as TDbRemoveGuardContext, Y as TDbRemoveGuard, Z as TDbStorageType, _ as DbQuery, _t as TSearchIndexInfo, a as TDbEncryptionOptions, at as TExistingForeignKey, b as FilterExpr, bt as TTableResolver, c as BaseDbAdapter, ct as TFkLookupResolver, d as AggregateFn, dt as TIdentification, et as TDbWriteGuard, f as AggregateQuery, ft as TMetaResponse, g as DbPatch, gt as TRelationInfo, h as DbControls, ht as TReferencingForeignKey, i as DbEncryption, it as TExistingColumn, j as TDbActionInfo, jt as isGeoIndexableType, k as TCrudOp, kt as TableMetadata, l as AggregateControls, lt as TFkLookupTarget, m as AtscriptDbWritable, mt as TPrimaryKeyChange, n as DbResponse, nt as TDeleteOptions, o as DocumentFieldMapper, ot as TExistingTableOption, p as AggregateResult, pt as TMetadataOverrides, q as TDbReferentialAction, r as resolveDesignType, rt as TEnsureTableOptions, s as FieldMappingStrategy, st as TFieldMeta, t as AtscriptDbReadable, tt as TDbWriteGuardContext, u as AggregateExpr, ut as TIdDescriptor, v as DbRow, vt as TSyncColumnResult, w as OwnPropsOf, wt as TWriteTableResolver, x as FlatOf, xt as TTouchManyOptions, y as FieldOpsFor, yt as TTableOptionDiff, z as TDbFieldMeta } from "./db-readable-B7eYWS5q.cjs";
2
2
  import { _ as separateFieldOps, a as $mul, c as $update, d as TDbFieldOp, f as TFieldOps, g as separateCas, h as reconcileCas, i as $insert, l as $upsert, m as isDbFieldOp, n as $dec, o as $remove, p as getDbFieldOp, r as $inc, s as $replace, t as $cas, u as TDbCas } from "./ops-AqhV7s9o.cjs";
3
- import { a as TViewColumnMapping, c as AtscriptQueryFieldRef, d as TViewJoin, f as TViewPlan, g as NativeIntegrity, h as IntegrityStrategy, i as AtscriptDbView, l as AtscriptQueryNode, m as AtscriptDbTable, n as TAdapterFactory, o as isAtscriptDbView, p as translateQueryTree, r as TDbSpaceOptions, s as AtscriptQueryComparison, t as DbSpace, u as AtscriptRef } from "./db-space-BevOyVrC.cjs";
4
- import { a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, g as DbErrorCode, h as DbError, l as isEmptyObject, m as CasExhaustedError, n as ValidatorMode, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isPlainObject } from "./validator-DuAmWc8L.cjs";
3
+ import { a as TViewColumnMapping, c as AtscriptQueryFieldRef, d as TViewJoin, f as TViewPlan, g as NativeIntegrity, h as IntegrityStrategy, i as AtscriptDbView, l as AtscriptQueryNode, m as AtscriptDbTable, n as TAdapterFactory, o as isAtscriptDbView, p as translateQueryTree, r as TDbSpaceOptions, s as AtscriptQueryComparison, t as DbSpace, u as AtscriptRef } from "./db-space-C2UCnGHd.cjs";
4
+ import { _ as DbErrorCode, a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, g as DbError, h as CasMismatchError, l as isEmptyObject, m as CasExhaustedError, n as ValidatorMode, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isPlainObject } from "./validator-wBARmD68.cjs";
5
5
  import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-BWy60OvG.cjs";
6
6
  import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, Uniquery as Uniquery$1, computeInsights, isPrimitive, walkFilter } from "@uniqu/core";
7
7
 
@@ -362,4 +362,4 @@ declare function createFailureCollector(what: string): {
362
362
  throwIfAny: () => void;
363
363
  };
364
364
  //#endregion
365
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, CasExhaustedError, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type OwnPropsOf, type PrimaryKeyOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateResult, type TDbWriteAction, type TDbWriteGuard, type TDbWriteGuardContext, type TDeleteOptions, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TGuardedQuery, type TIdDescriptor, type TIdentification, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReferencingForeignKey, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithOptimisticRetryOptions, type WithRelation, assertGeoPoint, assertNoVersionWrites, buildDbValidator, buildValidationContext, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, createDbValidatorPlugin, createFailureCollector, decomposePatch, findAncestorInSet, forceNavNonOptional, getDbFieldOp, getKeyProps, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, isAtscriptDbView, isDbFieldOp, isEmptyObject, isGeoIndexableType, isGeoPointType, isNavRelation, isPlainObject, isPrimitive, reconcileCas, resolveDesignType, separateCas, separateFieldOps, sortFieldNames, translateQueryTree, unsupportedOperatorMessage, walkFilter, withOptimisticRetry };
365
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, CasExhaustedError, CasMismatchError, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type OwnPropsOf, type PrimaryKeyOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateResult, type TDbWriteAction, type TDbWriteGuard, type TDbWriteGuardContext, type TDeleteOptions, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TGuardedQuery, type TIdDescriptor, type TIdentification, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReferencingForeignKey, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithOptimisticRetryOptions, type WithRelation, assertGeoPoint, assertNoVersionWrites, buildDbValidator, buildValidationContext, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, createDbValidatorPlugin, createFailureCollector, decomposePatch, findAncestorInSet, forceNavNonOptional, getDbFieldOp, getKeyProps, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, isAtscriptDbView, isDbFieldOp, isEmptyObject, isGeoIndexableType, isGeoPointType, isNavRelation, isPlainObject, isPrimitive, reconcileCas, resolveDesignType, separateCas, separateFieldOps, sortFieldNames, translateQueryTree, unsupportedOperatorMessage, walkFilter, withOptimisticRetry };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as TDbWriteAction, A as TCrudPermissions, At as isGeoIndexableType, B as TDbForeignKey, C as NullableOptional, Ct as TWriteTableResolver, D as TCascadeTarget, Dt as WithRelation, E as TCascadeResolver, Et as UniqueryControls, F as TDbCollation, G as TDbInsertResult, H as TDbIndexField, I as TDbDefaultFn, J as TDbRelation, K as TDbObjectKind, L as TDbDefaultValue, M as TDbActionIntent, Mt as NoopLogger, N as TDbActionLevel, Nt as TGenericLogger, O as TColumnDiff, Ot as TableMetadata, P as TDbActionProcessor, Pt as UniquSelect, Q as TDbUpdateResult, R as TDbDeleteResult, S as NavPropsOf, St as TWriteOptions, T as PrimaryKeyOf, Tt as Uniquery, U as TDbIndexType, V as TDbIndex, W as TDbInsertManyResult, X as TDbRemoveGuardContext, Y as TDbRemoveGuard, Z as TDbStorageType, _ as DbQuery, _t as TSearchIndexInfo, a as TDbEncryptionOptions, at as TExistingForeignKey, b as FilterExpr, bt as TTableResolver, c as BaseDbAdapter, ct as TFkLookupResolver, d as AggregateFn, dt as TIdentification, et as TDbWriteGuard, f as AggregateQuery, ft as TMetaResponse, g as DbPatch, gt as TRelationInfo, h as DbControls, ht as TReferencingForeignKey, i as DbEncryption, it as TExistingColumn, j as TDbActionInfo, jt as isGeoPointType, k as TCrudOp, kt as findAncestorInSet, l as AggregateControls, lt as TFkLookupTarget, m as AtscriptDbWritable, mt as TPrimaryKeyChange, n as DbResponse, nt as TDeleteOptions, o as DocumentFieldMapper, ot as TExistingTableOption, p as AggregateResult, pt as TMetadataOverrides, q as TDbReferentialAction, r as resolveDesignType, rt as TEnsureTableOptions, s as FieldMappingStrategy, st as TFieldMeta, t as AtscriptDbReadable, tt as TDbWriteGuardContext, u as AggregateExpr, ut as TIdDescriptor, v as DbRow, vt as TSyncColumnResult, w as OwnPropsOf, wt as TypedWithRelation, x as FlatOf, xt as TValueFormatterPair, y as FieldOpsFor, yt as TTableOptionDiff, z as TDbFieldMeta } from "./db-readable-BTl4NzNN.mjs";
1
+ import { $ as TDbWriteAction, A as TCrudPermissions, At as findAncestorInSet, B as TDbForeignKey, C as NullableOptional, Ct as TWriteOptions, D as TCascadeTarget, Dt as UniqueryControls, E as TCascadeResolver, Et as Uniquery, F as TDbCollation, Ft as UniquSelect, G as TDbInsertResult, H as TDbIndexField, I as TDbDefaultFn, J as TDbRelation, K as TDbObjectKind, L as TDbDefaultValue, M as TDbActionIntent, Mt as isGeoPointType, N as TDbActionLevel, Nt as NoopLogger, O as TColumnDiff, Ot as WithRelation, P as TDbActionProcessor, Pt as TGenericLogger, Q as TDbUpdateResult, R as TDbDeleteResult, S as NavPropsOf, St as TValueFormatterPair, T as PrimaryKeyOf, Tt as TypedWithRelation, U as TDbIndexType, V as TDbIndex, W as TDbInsertManyResult, X as TDbRemoveGuardContext, Y as TDbRemoveGuard, Z as TDbStorageType, _ as DbQuery, _t as TSearchIndexInfo, a as TDbEncryptionOptions, at as TExistingForeignKey, b as FilterExpr, bt as TTableResolver, c as BaseDbAdapter, ct as TFkLookupResolver, d as AggregateFn, dt as TIdentification, et as TDbWriteGuard, f as AggregateQuery, ft as TMetaResponse, g as DbPatch, gt as TRelationInfo, h as DbControls, ht as TReferencingForeignKey, i as DbEncryption, it as TExistingColumn, j as TDbActionInfo, jt as isGeoIndexableType, k as TCrudOp, kt as TableMetadata, l as AggregateControls, lt as TFkLookupTarget, m as AtscriptDbWritable, mt as TPrimaryKeyChange, n as DbResponse, nt as TDeleteOptions, o as DocumentFieldMapper, ot as TExistingTableOption, p as AggregateResult, pt as TMetadataOverrides, q as TDbReferentialAction, r as resolveDesignType, rt as TEnsureTableOptions, s as FieldMappingStrategy, st as TFieldMeta, t as AtscriptDbReadable, tt as TDbWriteGuardContext, u as AggregateExpr, ut as TIdDescriptor, v as DbRow, vt as TSyncColumnResult, w as OwnPropsOf, wt as TWriteTableResolver, x as FlatOf, xt as TTouchManyOptions, y as FieldOpsFor, yt as TTableOptionDiff, z as TDbFieldMeta } from "./db-readable-Bn1bV_eC.mjs";
2
2
  import { _ as separateFieldOps, a as $mul, c as $update, d as TDbFieldOp, f as TFieldOps, g as separateCas, h as reconcileCas, i as $insert, l as $upsert, m as isDbFieldOp, n as $dec, o as $remove, p as getDbFieldOp, r as $inc, s as $replace, t as $cas, u as TDbCas } from "./ops-AqhV7s9o.mjs";
3
- import { a as TViewColumnMapping, c as AtscriptQueryFieldRef, d as TViewJoin, f as TViewPlan, g as NativeIntegrity, h as IntegrityStrategy, i as AtscriptDbView, l as AtscriptQueryNode, m as AtscriptDbTable, n as TAdapterFactory, o as isAtscriptDbView, p as translateQueryTree, r as TDbSpaceOptions, s as AtscriptQueryComparison, t as DbSpace, u as AtscriptRef } from "./db-space-BEB5Jl8M.mjs";
4
- import { a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, g as DbErrorCode, h as DbError, l as isEmptyObject, m as CasExhaustedError, n as ValidatorMode, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isPlainObject } from "./validator-DuAmWc8L.mjs";
3
+ import { a as TViewColumnMapping, c as AtscriptQueryFieldRef, d as TViewJoin, f as TViewPlan, g as NativeIntegrity, h as IntegrityStrategy, i as AtscriptDbView, l as AtscriptQueryNode, m as AtscriptDbTable, n as TAdapterFactory, o as isAtscriptDbView, p as translateQueryTree, r as TDbSpaceOptions, s as AtscriptQueryComparison, t as DbSpace, u as AtscriptRef } from "./db-space-DdIPYD0Q.mjs";
4
+ import { _ as DbErrorCode, a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, g as DbError, h as CasMismatchError, l as isEmptyObject, m as CasExhaustedError, n as ValidatorMode, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isPlainObject } from "./validator-wBARmD68.mjs";
5
5
  import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-BWy60OvG.mjs";
6
6
  import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, Uniquery as Uniquery$1, computeInsights, isPrimitive, walkFilter } from "@uniqu/core";
7
7
 
@@ -362,4 +362,4 @@ declare function createFailureCollector(what: string): {
362
362
  throwIfAny: () => void;
363
363
  };
364
364
  //#endregion
365
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, CasExhaustedError, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type OwnPropsOf, type PrimaryKeyOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateResult, type TDbWriteAction, type TDbWriteGuard, type TDbWriteGuardContext, type TDeleteOptions, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TGuardedQuery, type TIdDescriptor, type TIdentification, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReferencingForeignKey, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithOptimisticRetryOptions, type WithRelation, assertGeoPoint, assertNoVersionWrites, buildDbValidator, buildValidationContext, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, createDbValidatorPlugin, createFailureCollector, decomposePatch, findAncestorInSet, forceNavNonOptional, getDbFieldOp, getKeyProps, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, isAtscriptDbView, isDbFieldOp, isEmptyObject, isGeoIndexableType, isGeoPointType, isNavRelation, isPlainObject, isPrimitive, reconcileCas, resolveDesignType, separateCas, separateFieldOps, sortFieldNames, translateQueryTree, unsupportedOperatorMessage, walkFilter, withOptimisticRetry };
365
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, CasExhaustedError, CasMismatchError, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type OwnPropsOf, type PrimaryKeyOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateResult, type TDbWriteAction, type TDbWriteGuard, type TDbWriteGuardContext, type TDeleteOptions, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TGuardedQuery, type TIdDescriptor, type TIdentification, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReferencingForeignKey, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithOptimisticRetryOptions, type WithRelation, assertGeoPoint, assertNoVersionWrites, buildDbValidator, buildValidationContext, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, createDbValidatorPlugin, createFailureCollector, decomposePatch, findAncestorInSet, forceNavNonOptional, getDbFieldOp, getKeyProps, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, isAtscriptDbView, isDbFieldOp, isEmptyObject, isGeoIndexableType, isGeoPointType, isNavRelation, isPlainObject, isPrimitive, reconcileCas, resolveDesignType, separateCas, separateFieldOps, sortFieldNames, translateQueryTree, unsupportedOperatorMessage, walkFilter, withOptimisticRetry };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { n as DbError, t as CasExhaustedError } from "./db-error-BHPXOKzc.mjs";
2
- import { A as isGeoIndexableType, C as unsupportedOperatorMessage, D as UniquSelect, E as FieldMappingStrategy, M as NoopLogger, O as TableMetadata, S as sortFieldNames, T as DocumentFieldMapper, _ as guardAggregate, a as decomposePatch, b as guardPaths, c as createFailureCollector, d as AtscriptDbReadable, f as resolveDesignType, g as collectQueryPaths, h as classifyQueryPath, i as assertNoVersionWrites, j as isGeoPointType, k as findAncestorInSet, l as IntegrityStrategy, m as checkHavingKeys, n as isAtscriptDbView, o as ApplicationIntegrity, p as assertGeoPoint, r as AtscriptDbTable, s as BaseDbAdapter, t as AtscriptDbView, u as NativeIntegrity, v as guardFilter, w as RelationalFieldMapper, x as guardQuery, y as guardPath } from "./db-view-Ck0I-PMI.mjs";
3
- import { a as forceNavNonOptional, c as getKeyProps, l as isEmptyObject, o as isNavRelation, r as buildValidationContext, s as createDbValidatorPlugin, t as buildDbValidator, u as isPlainObject } from "./validator-eKYWf3xf.mjs";
1
+ import { n as CasMismatchError, r as DbError, t as CasExhaustedError } from "./db-error-COrO58t5.mjs";
2
+ import { A as isGeoIndexableType, C as unsupportedOperatorMessage, D as UniquSelect, E as FieldMappingStrategy, M as NoopLogger, O as TableMetadata, S as sortFieldNames, T as DocumentFieldMapper, _ as guardAggregate, a as decomposePatch, b as guardPaths, c as createFailureCollector, d as AtscriptDbReadable, f as resolveDesignType, g as collectQueryPaths, h as classifyQueryPath, i as assertNoVersionWrites, j as isGeoPointType, k as findAncestorInSet, l as IntegrityStrategy, m as checkHavingKeys, n as isAtscriptDbView, o as ApplicationIntegrity, p as assertGeoPoint, r as AtscriptDbTable, s as BaseDbAdapter, t as AtscriptDbView, u as NativeIntegrity, v as guardFilter, w as RelationalFieldMapper, x as guardQuery, y as guardPath } from "./db-view-BkF2xEGd.mjs";
3
+ import { a as forceNavNonOptional, c as getKeyProps, l as isEmptyObject, o as isNavRelation, r as buildValidationContext, s as createDbValidatorPlugin, t as buildDbValidator, u as isPlainObject } from "./validator-CeD_fqyW.mjs";
4
4
  import { t as DEFAULT_DB_SPACE } from "./consts-C_-5_pFq.mjs";
5
5
  import { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, getDbFieldOp, isDbFieldOp, reconcileCas, separateCas, separateFieldOps } from "./ops.mjs";
6
6
  import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
@@ -372,4 +372,4 @@ function translateQueryTree(node, resolveField) {
372
372
  return { [leftField]: { [comp.op]: comp.right } };
373
373
  }
374
374
  //#endregion
375
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, BaseDbAdapter, CasExhaustedError, DEFAULT_DB_SPACE, DbEncryption, DbError, DbSpace, DocumentFieldMapper, FieldMappingStrategy, IntegrityStrategy, NativeIntegrity, NoopLogger, RelationalFieldMapper, TableMetadata, UniquSelect, assertGeoPoint, assertNoVersionWrites, buildDbValidator, buildValidationContext, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, createDbValidatorPlugin, createFailureCollector, decomposePatch, findAncestorInSet, forceNavNonOptional, getDbFieldOp, getKeyProps, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, isAtscriptDbView, isDbFieldOp, isEmptyObject, isGeoIndexableType, isGeoPointType, isNavRelation, isPlainObject, isPrimitive, reconcileCas, resolveDesignType, separateCas, separateFieldOps, sortFieldNames, translateQueryTree, unsupportedOperatorMessage, walkFilter, withOptimisticRetry };
375
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, BaseDbAdapter, CasExhaustedError, CasMismatchError, DEFAULT_DB_SPACE, DbEncryption, DbError, DbSpace, DocumentFieldMapper, FieldMappingStrategy, IntegrityStrategy, NativeIntegrity, NoopLogger, RelationalFieldMapper, TableMetadata, UniquSelect, assertGeoPoint, assertNoVersionWrites, buildDbValidator, buildValidationContext, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, createDbValidatorPlugin, createFailureCollector, decomposePatch, findAncestorInSet, forceNavNonOptional, getDbFieldOp, getKeyProps, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, isAtscriptDbView, isDbFieldOp, isEmptyObject, isGeoIndexableType, isGeoPointType, isNavRelation, isPlainObject, isPrimitive, reconcileCas, resolveDesignType, separateCas, separateFieldOps, sortFieldNames, translateQueryTree, unsupportedOperatorMessage, walkFilter, withOptimisticRetry };
@@ -1,4 +1,4 @@
1
- import { n as DbError, r as DepthLimitExceededError } from "./db-error-BHPXOKzc.mjs";
1
+ import { i as DepthLimitExceededError, r as DbError } from "./db-error-COrO58t5.mjs";
2
2
  import { ValidatorError } from "@atscript/typescript/utils";
3
3
  //#region src/rel/relation-helpers.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_db_error = require("./db-error-DXwEzmYJ.cjs");
1
+ const require_db_error = require("./db-error-C4JuLcvb.cjs");
2
2
  let _atscript_typescript_utils = require("@atscript/typescript/utils");
3
3
  //#region src/rel/relation-helpers.ts
4
4
  /**
package/dist/ops.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_db_error = require("./db-error-DXwEzmYJ.cjs");
2
+ const require_db_error = require("./db-error-C4JuLcvb.cjs");
3
3
  //#region src/ops.ts
4
4
  /** Increment a numeric field by `value` (default 1). */
5
5
  function $inc(value = 1) {
package/dist/ops.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as DbError } from "./db-error-BHPXOKzc.mjs";
1
+ import { r as DbError } from "./db-error-COrO58t5.mjs";
2
2
  //#region src/ops.ts
3
3
  /** Increment a numeric field by `value` (default 1). */
4
4
  function $inc(value = 1) {
package/dist/rel.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_nested_writer = require("./nested-writer-DoDhl3X3.cjs");
3
- const require_relation_loader = require("./relation-loader-BnUgJsUG.cjs");
2
+ const require_nested_writer = require("./nested-writer-DxPhmWFz.cjs");
3
+ const require_relation_loader = require("./relation-loader-C8GOpNYJ.cjs");
4
4
  exports.batchInsertNestedFrom = require_nested_writer.batchInsertNestedFrom;
5
5
  exports.batchInsertNestedTo = require_nested_writer.batchInsertNestedTo;
6
6
  exports.batchInsertNestedVia = require_nested_writer.batchInsertNestedVia;
package/dist/rel.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as TDbForeignKey, Ct as TWriteTableResolver, J as TDbRelation, Nt as TGenericLogger, Ot as TableMetadata, bt as TTableResolver, c as BaseDbAdapter } from "./db-readable-CkbZn_z-.cjs";
1
+ import { B as TDbForeignKey, J as TDbRelation, Pt as TGenericLogger, bt as TTableResolver, c as BaseDbAdapter, kt as TableMetadata, wt as TWriteTableResolver } from "./db-readable-B7eYWS5q.cjs";
2
2
  import { t as DbValidationContext } from "./db-validator-plugin-BWy60OvG.cjs";
3
3
  import { FilterExpr, WithRelation } from "@uniqu/core";
4
4
  import { Validator } from "@atscript/typescript/utils";
package/dist/rel.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as TDbForeignKey, Ct as TWriteTableResolver, J as TDbRelation, Nt as TGenericLogger, Ot as TableMetadata, bt as TTableResolver, c as BaseDbAdapter } from "./db-readable-BTl4NzNN.mjs";
1
+ import { B as TDbForeignKey, J as TDbRelation, Pt as TGenericLogger, bt as TTableResolver, c as BaseDbAdapter, kt as TableMetadata, wt as TWriteTableResolver } from "./db-readable-Bn1bV_eC.mjs";
2
2
  import { t as DbValidationContext } from "./db-validator-plugin-BWy60OvG.mjs";
3
3
  import { Validator } from "@atscript/typescript/utils";
4
4
  import { FilterExpr, WithRelation } from "@uniqu/core";
package/dist/rel.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as loadRelationsImpl } from "./relation-loader-BmeOMj0b.mjs";
2
- import { _ as resolveRelationTargetTable, a as batchPatchNestedTo, c as batchReplaceNestedTo, d as preValidateNestedFrom, f as validateBatch, g as findRemoteFK, h as findFKForRelation, i as batchPatchNestedFrom, l as batchReplaceNestedVia, n as batchInsertNestedTo, o as batchPatchNestedVia, r as batchInsertNestedVia, s as batchReplaceNestedFrom, t as batchInsertNestedFrom, u as checkDepthOverflow } from "./nested-writer-DI-HeTky.mjs";
1
+ import { t as loadRelationsImpl } from "./relation-loader-CUGcxJ18.mjs";
2
+ import { _ as resolveRelationTargetTable, a as batchPatchNestedTo, c as batchReplaceNestedTo, d as preValidateNestedFrom, f as validateBatch, g as findRemoteFK, h as findFKForRelation, i as batchPatchNestedFrom, l as batchReplaceNestedVia, n as batchInsertNestedTo, o as batchPatchNestedVia, r as batchInsertNestedVia, s as batchReplaceNestedFrom, t as batchInsertNestedFrom, u as checkDepthOverflow } from "./nested-writer-CkDo-ZfH.mjs";
3
3
  export { batchInsertNestedFrom, batchInsertNestedTo, batchInsertNestedVia, batchPatchNestedFrom, batchPatchNestedTo, batchPatchNestedVia, batchReplaceNestedFrom, batchReplaceNestedTo, batchReplaceNestedVia, checkDepthOverflow, findFKForRelation, findRemoteFK, loadRelationsImpl, preValidateNestedFrom, resolveRelationTargetTable, validateBatch };
@@ -1,4 +1,4 @@
1
- const require_nested_writer = require("./nested-writer-DoDhl3X3.cjs");
1
+ const require_nested_writer = require("./nested-writer-DxPhmWFz.cjs");
2
2
  //#region src/rel/relation-loader.ts
3
3
  var relation_loader_exports = /* @__PURE__ */ require("./plugin.cjs").__exportAll({
4
4
  ensureSelectIncludesFields: () => ensureSelectIncludesFields,
@@ -1,4 +1,4 @@
1
- import { _ as resolveRelationTargetTable, g as findRemoteFK, h as findFKForRelation } from "./nested-writer-DI-HeTky.mjs";
1
+ import { _ as resolveRelationTargetTable, g as findRemoteFK, h as findFKForRelation } from "./nested-writer-CkDo-ZfH.mjs";
2
2
  //#region \0rolldown/runtime.js
3
3
  var __defProp = Object.defineProperty;
4
4
  var __exportAll = (all, no_symbols) => {