@atscript/db 0.1.162 → 0.1.163

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.d.cts +1 -1
  2. package/dist/agg.d.mts +1 -1
  3. package/dist/{buckets-_iZV39Z3.d.cts → buckets-B8UOod-v.d.cts} +13 -0
  4. package/dist/{buckets-DUTcrT4Z.d.mts → buckets-CHyspjYP.d.mts} +13 -0
  5. package/dist/{column-diff-CZsMGQ_w.cjs → column-diff-BIGX3sRH.cjs} +9 -2
  6. package/dist/{column-diff-pdn53AIj.mjs → column-diff-BfNIlMwX.mjs} +9 -2
  7. package/dist/{fk-diff-B5jW68T3.d.cts → fk-diff-BNGawZi9.d.cts} +1 -1
  8. package/dist/{fk-diff-PhVBYohc.d.mts → fk-diff-rj9N2QLw.d.mts} +1 -1
  9. package/dist/index.cjs +5 -2
  10. package/dist/index.d.cts +5 -5
  11. package/dist/index.d.mts +5 -5
  12. package/dist/index.mjs +4 -3
  13. package/dist/plugin.cjs +2 -2
  14. package/dist/plugin.mjs +2 -2
  15. package/dist/rel.d.cts +2 -2
  16. package/dist/rel.d.mts +2 -2
  17. package/dist/{relation-helpers-BAEkP4bH.d.cts → relation-helpers-DloMywNs.d.cts} +1 -1
  18. package/dist/{relation-helpers-BSYwxOSA.d.mts → relation-helpers-zwt19E7r.d.mts} +1 -1
  19. package/dist/{search-fields-Bi1n-pB1.cjs → search-fields-B49-RCWd.cjs} +2 -2
  20. package/dist/{search-fields-0U0FAFGj.mjs → search-fields-BPNsxrCk.mjs} +2 -2
  21. package/dist/server-stamped-B6XbUQ4p.cjs +33 -0
  22. package/dist/server-stamped-BoP56K9M.mjs +22 -0
  23. package/dist/shared.cjs +2 -2
  24. package/dist/shared.d.cts +3 -3
  25. package/dist/shared.d.mts +3 -3
  26. package/dist/shared.mjs +2 -2
  27. package/dist/sync.cjs +1 -1
  28. package/dist/sync.d.cts +2 -2
  29. package/dist/sync.d.mts +2 -2
  30. package/dist/sync.mjs +1 -1
  31. package/dist/{validator-BcBtg8yW.d.cts → validator-DX97RzC2.d.cts} +21 -1
  32. package/dist/{validator-BcBtg8yW.d.mts → validator-DX97RzC2.d.mts} +21 -1
  33. package/dist/validator.cjs +3 -0
  34. package/dist/validator.d.cts +2 -2
  35. package/dist/validator.d.mts +2 -2
  36. package/dist/validator.mjs +2 -1
  37. package/dist/{view-validation-QbqqXEAM.mjs → view-validation-BcgDq7M9.mjs} +2 -2
  38. package/dist/{view-validation-D50KWU7O.cjs → view-validation-BiDLCYMw.cjs} +2 -2
  39. package/package.json +1 -1
package/dist/agg.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { r as TResolvedBucket } from "./buckets-_iZV39Z3.cjs";
1
+ import { r as TResolvedBucket } from "./buckets-B8UOod-v.cjs";
2
2
  import { _ as TDbAggregateFn, a as AggregateResult, c as CalendarBucketLabel, d as WeekStart, f as isAggregateExpr, h as resolveAlias, i as AggregateQuery, l as ComputedExpr, m as resolveAggregateSearch, n as AggregateExpr, o as BucketExpr, p as isBucketExpr, r as AggregateFn, s as BucketUnit, t as AggregateControls, u as ResolvedBucket, v as assertAggregateFn } from "./agg-42CSpGDR.cjs";
3
3
  export { type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, type BucketExpr, type BucketUnit, type CalendarBucketLabel, type ComputedExpr, type ResolvedBucket, type TDbAggregateFn, type TResolvedBucket, type WeekStart, assertAggregateFn, isAggregateExpr, isBucketExpr, resolveAggregateSearch, resolveAlias };
package/dist/agg.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { r as TResolvedBucket } from "./buckets-DUTcrT4Z.mjs";
1
+ import { r as TResolvedBucket } from "./buckets-CHyspjYP.mjs";
2
2
  import { _ as TDbAggregateFn, a as AggregateResult, c as CalendarBucketLabel, d as WeekStart, f as isAggregateExpr, h as resolveAlias, i as AggregateQuery, l as ComputedExpr, m as resolveAggregateSearch, n as AggregateExpr, o as BucketExpr, p as isBucketExpr, r as AggregateFn, s as BucketUnit, t as AggregateControls, u as ResolvedBucket, v as assertAggregateFn } from "./agg-Wo-smrYV.mjs";
3
3
  export { type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, type BucketExpr, type BucketUnit, type CalendarBucketLabel, type ComputedExpr, type ResolvedBucket, type TDbAggregateFn, type TResolvedBucket, type WeekStart, assertAggregateFn, isAggregateExpr, isBucketExpr, resolveAggregateSearch, resolveAlias };
@@ -2308,6 +2308,19 @@ interface TIndexDiffOptions {
2308
2308
  * @since 0.1.162
2309
2309
  */
2310
2310
  skipIndex?(index: TDbIndex): string | null | undefined;
2311
+ /**
2312
+ * Skips (silently) every index of a type this returns `true` for.
2313
+ * @deprecated since 0.1.162 — use {@link TIndexDiffOptions.skipIndex} (return `null`).
2314
+ */
2315
+ shouldSkipType?(type: TDbIndex["type"]): boolean;
2316
+ /**
2317
+ * Index types the adapter does not support — warned about and skipped.
2318
+ * @deprecated since 0.1.162 — use {@link TIndexDiffOptions.skipIndex} (return the warning).
2319
+ */
2320
+ warnUnsupportedTypes?: {
2321
+ adapter: string;
2322
+ types: ReadonlyArray<TDbIndex["type"]>;
2323
+ };
2311
2324
  /**
2312
2325
  * Prefixed indexes the adapter manages itself, outside the model's
2313
2326
  * `indexes` (e.g. PostgreSQL's pgvector HNSW indexes) — never dropped as
@@ -2308,6 +2308,19 @@ interface TIndexDiffOptions {
2308
2308
  * @since 0.1.162
2309
2309
  */
2310
2310
  skipIndex?(index: TDbIndex): string | null | undefined;
2311
+ /**
2312
+ * Skips (silently) every index of a type this returns `true` for.
2313
+ * @deprecated since 0.1.162 — use {@link TIndexDiffOptions.skipIndex} (return `null`).
2314
+ */
2315
+ shouldSkipType?(type: TDbIndex["type"]): boolean;
2316
+ /**
2317
+ * Index types the adapter does not support — warned about and skipped.
2318
+ * @deprecated since 0.1.162 — use {@link TIndexDiffOptions.skipIndex} (return the warning).
2319
+ */
2320
+ warnUnsupportedTypes?: {
2321
+ adapter: string;
2322
+ types: ReadonlyArray<TDbIndex["type"]>;
2323
+ };
2311
2324
  /**
2312
2325
  * Prefixed indexes the adapter manages itself, outside the model's
2313
2326
  * `indexes` (e.g. PostgreSQL's pgvector HNSW indexes) — never dropped as
@@ -2,7 +2,7 @@ const require_db_error = require("./db-error-DmF1_xrz.cjs");
2
2
  const require_aggregate_fns = require("./aggregate-fns-DupYzFD7.cjs");
3
3
  const require_nested_writer = require("./nested-writer-yCy6wGuN.cjs");
4
4
  const require_validator = require("./validator-DK9Ijpo7.cjs");
5
- const require_search_fields = require("./search-fields-Bi1n-pB1.cjs");
5
+ const require_search_fields = require("./search-fields-B49-RCWd.cjs");
6
6
  const require_object = require("./object-GjsuPNqo.cjs");
7
7
  require("./agg.cjs");
8
8
  const require_aggregate_rules = require("./aggregate-rules-D_bsCpUI.cjs");
@@ -5718,6 +5718,12 @@ const txStorage = new node_async_hooks.AsyncLocalStorage();
5718
5718
  function findTxContext(owner) {
5719
5719
  for (let ctx = txStorage.getStore(); ctx; ctx = ctx.parent) if (ctx.owner === owner) return ctx;
5720
5720
  }
5721
+ /** Skip verdict of the deprecated `shouldSkipType` / `warnUnsupportedTypes` options. */
5722
+ function legacySkipReason(opts, index) {
5723
+ const unsupported = opts.warnUnsupportedTypes;
5724
+ if (unsupported?.types.includes(index.type)) return `[${unsupported.adapter}] ${index.type} index "${index.name}" declared but not supported by this adapter — skipped`;
5725
+ return opts.shouldSkipType?.(index.type) ? null : void 0;
5726
+ }
5721
5727
  /**
5722
5728
  * Abstract base class for database adapters.
5723
5729
  *
@@ -6346,7 +6352,8 @@ var BaseDbAdapter = class {
6346
6352
  const { changes, apply } = createChangeRecorder(dryRun, attempt);
6347
6353
  for (const index of this._table.indexes.values()) {
6348
6354
  if (index.type === "fulltext" && !index.fields.some((f) => !f.integer)) continue;
6349
- const skipReason = opts.skipIndex?.(index);
6355
+ let skipReason = opts.skipIndex?.(index);
6356
+ if (skipReason === void 0) skipReason = legacySkipReason(opts, index);
6350
6357
  if (skipReason !== void 0) {
6351
6358
  if (skipReason !== null && !dryRun) this.logger.warn(skipReason);
6352
6359
  continue;
@@ -2,7 +2,7 @@ import { a as aggregateExpressionsNotSupported, c as invalidQuery, d as spaceClo
2
2
  import { a as SOURCE_VALUE_FNS, c as isFirstLast, o as SUPPORTED_AGGREGATE_FNS, r as BASE_AGGREGATE_FNS, t as AGG_ANNOTATIONS } from "./aggregate-fns-DsS9UQVB.mjs";
3
3
  import { A as hasRelationOp, D as containsRelationFilter, F as resolveRelationFilterTree, H as tableNameOf, I as compositeKey, J as viewExprNullable, K as isFieldRef, L as findFKEntryForRelation, M as noteRelationFilter, N as relGuardState, O as createRelationFilterHost, R as findFKForRelation, S as uniqueKeyTuple, U as computeOf, V as slicePerGroup, W as computedOperands, Y as walkViewExpr, _ as remapDeleteFkViolation, a as batchPatchNestedFrom, b as rowMatchesKey, c as batchReplaceNestedFrom, d as checkDepthOverflow, f as planNestedFromVia, g as enrichFkViolation, h as validateBatch, i as batchInsertNestedVia, l as batchReplaceNestedTo, m as preValidateNestedFrom, n as batchInsertNestedFrom, p as planPatchNestedTo, r as batchInsertNestedTo, s as batchPatchNestedVia, t as applyPatchNestedTo, u as batchReplaceNestedVia, v as findRowsByKeys, x as sameKey, y as pkTupleKey, z as findRemoteFK } from "./nested-writer-ClUX0DB0.mjs";
4
4
  import { a as forceNavNonOptional, c as getKeyProps, d as soleUnionMember, f as unionValueMembers, i as dbPlugin, l as columnUnionBase, n as buildPatchPartial, t as buildDbValidator, u as pathPresence } from "./validator-DuDWsIdQ.mjs";
5
- import { a as searchMemberKind, c as DERIVED_INCOMPATIBLE, n as ENCRYPTED_SEARCH_FEATURES, o as numericTypeProblem, t as ENCRYPTED_INCOMPATIBLE, u as isJsonLeafType } from "./search-fields-0U0FAFGj.mjs";
5
+ import { a as searchMemberKind, c as DERIVED_INCOMPATIBLE, n as ENCRYPTED_SEARCH_FEATURES, o as numericTypeProblem, t as ENCRYPTED_INCOMPATIBLE, u as isJsonLeafType } from "./search-fields-BPNsxrCk.mjs";
6
6
  import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, s as stableJson, t as deletePath } from "./object-PQ1J8jri.mjs";
7
7
  import { resolveAlias as resolveAlias$1 } from "./agg.mjs";
8
8
  import { t as NOT_DIMENSION_REASON } from "./aggregate-rules-jdPrxqWa.mjs";
@@ -5718,6 +5718,12 @@ const txStorage = new AsyncLocalStorage();
5718
5718
  function findTxContext(owner) {
5719
5719
  for (let ctx = txStorage.getStore(); ctx; ctx = ctx.parent) if (ctx.owner === owner) return ctx;
5720
5720
  }
5721
+ /** Skip verdict of the deprecated `shouldSkipType` / `warnUnsupportedTypes` options. */
5722
+ function legacySkipReason(opts, index) {
5723
+ const unsupported = opts.warnUnsupportedTypes;
5724
+ if (unsupported?.types.includes(index.type)) return `[${unsupported.adapter}] ${index.type} index "${index.name}" declared but not supported by this adapter — skipped`;
5725
+ return opts.shouldSkipType?.(index.type) ? null : void 0;
5726
+ }
5721
5727
  /**
5722
5728
  * Abstract base class for database adapters.
5723
5729
  *
@@ -6346,7 +6352,8 @@ var BaseDbAdapter = class {
6346
6352
  const { changes, apply } = createChangeRecorder(dryRun, attempt);
6347
6353
  for (const index of this._table.indexes.values()) {
6348
6354
  if (index.type === "fulltext" && !index.fields.some((f) => !f.integer)) continue;
6349
- const skipReason = opts.skipIndex?.(index);
6355
+ let skipReason = opts.skipIndex?.(index);
6356
+ if (skipReason === void 0) skipReason = legacySkipReason(opts, index);
6350
6357
  if (skipReason !== void 0) {
6351
6358
  if (skipReason !== null && !dryRun) this.logger.warn(skipReason);
6352
6359
  continue;
@@ -1,4 +1,4 @@
1
- import { B as TDbCollation, Bn as AtscriptDbReadable, Et as TExistingTableOption, G as TDbFieldMeta, H as TDbDefaultValue, K as TDbForeignKey, On as AtscriptQueryFieldRef, St as TDerivedColumn, V as TDbDefaultFn, dt as TDbStorageType, j as TColumnDiff, kn as AtscriptQueryNode, wt as TExistingColumn, yn as AtscriptDbView } from "./buckets-_iZV39Z3.cjs";
1
+ import { B as TDbCollation, Bn as AtscriptDbReadable, Et as TExistingTableOption, G as TDbFieldMeta, H as TDbDefaultValue, K as TDbForeignKey, On as AtscriptQueryFieldRef, St as TDerivedColumn, V as TDbDefaultFn, dt as TDbStorageType, j as TColumnDiff, kn as AtscriptQueryNode, wt as TExistingColumn, yn as AtscriptDbView } from "./buckets-B8UOod-v.cjs";
2
2
 
3
3
  //#region src/schema/schema-hash.d.ts
4
4
  interface TFieldSnapshot {
@@ -1,4 +1,4 @@
1
- import { B as TDbCollation, Bn as AtscriptDbReadable, Et as TExistingTableOption, G as TDbFieldMeta, H as TDbDefaultValue, K as TDbForeignKey, On as AtscriptQueryFieldRef, St as TDerivedColumn, V as TDbDefaultFn, dt as TDbStorageType, j as TColumnDiff, kn as AtscriptQueryNode, wt as TExistingColumn, yn as AtscriptDbView } from "./buckets-DUTcrT4Z.mjs";
1
+ import { B as TDbCollation, Bn as AtscriptDbReadable, Et as TExistingTableOption, G as TDbFieldMeta, H as TDbDefaultValue, K as TDbForeignKey, On as AtscriptQueryFieldRef, St as TDerivedColumn, V as TDbDefaultFn, dt as TDbStorageType, j as TColumnDiff, kn as AtscriptQueryNode, wt as TExistingColumn, yn as AtscriptDbView } from "./buckets-CHyspjYP.mjs";
2
2
 
3
3
  //#region src/schema/schema-hash.d.ts
4
4
  interface TFieldSnapshot {
package/dist/index.cjs CHANGED
@@ -1,10 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_db_error = require("./db-error-DmF1_xrz.cjs");
3
- const require_column_diff = require("./column-diff-CZsMGQ_w.cjs");
3
+ const require_column_diff = require("./column-diff-BIGX3sRH.cjs");
4
4
  const require_aggregate_fns = require("./aggregate-fns-DupYzFD7.cjs");
5
5
  const require_nested_writer = require("./nested-writer-yCy6wGuN.cjs");
6
6
  const require_validator = require("./validator-DK9Ijpo7.cjs");
7
- const require_search_fields = require("./search-fields-Bi1n-pB1.cjs");
7
+ const require_server_stamped = require("./server-stamped-B6XbUQ4p.cjs");
8
+ const require_search_fields = require("./search-fields-B49-RCWd.cjs");
8
9
  const require_object = require("./object-GjsuPNqo.cjs");
9
10
  const require_consts = require("./consts-BzRfCcH2.cjs");
10
11
  const require_ops = require("./ops.cjs");
@@ -600,6 +601,7 @@ exports.REL_FILTER_MAX_DEPTH = require_nested_writer.REL_FILTER_MAX_DEPTH;
600
601
  exports.REL_FILTER_MAX_NODES = require_nested_writer.REL_FILTER_MAX_NODES;
601
602
  exports.RelationalFieldMapper = require_column_diff.RelationalFieldMapper;
602
603
  exports.ResolvedRelationFilter = require_nested_writer.ResolvedRelationFilter;
604
+ exports.SERVER_STAMPED_ON_UPDATE_KEYS = require_server_stamped.SERVER_STAMPED_ON_UPDATE_KEYS;
603
605
  exports.TableMetadata = require_column_diff.TableMetadata;
604
606
  exports.UniquSelect = require_column_diff.UniquSelect;
605
607
  exports.acceptedOperatorsHint = require_column_diff.acceptedOperatorsHint;
@@ -675,6 +677,7 @@ Object.defineProperty(exports, "isRelationOp", {
675
677
  });
676
678
  exports.isResolvedRelationFilter = require_nested_writer.isResolvedRelationFilter;
677
679
  exports.isRetryableDbError = require_db_error.isRetryableDbError;
680
+ exports.isServerStampedOnUpdate = require_server_stamped.isServerStampedOnUpdate;
678
681
  exports.isVersionExemptPatch = require_column_diff.isVersionExemptPatch;
679
682
  exports.isViewType = require_column_diff.isViewType;
680
683
  exports.jsonValueAncestor = require_column_diff.jsonValueAncestor;
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
- import { $ as TDbInsertManyIgnoreResult, $n as hasRelationOp, $t as TWriteOptions, A as TCascadeTarget, An as AtscriptRef, At as TForeignKeyChange, B as TDbCollation, Bn as AtscriptDbReadable, Bt as TReadLockOptions, C as NavPropsOf, Cn as TViewReadPlan, Ct as TEnsureTableOptions, D as PrimaryKeyOf, Dn as AtscriptQueryComparison, Dt as TFieldMeta, E as OwnPropsOf, En as AtscriptOrderItem, Et as TExistingTableOption, F as TDbActionIntent, Fn as translateQueryTree, Ft as TInsertOptions, G as TDbFieldMeta, Gn as ResolvedRelationFilter, Gt as TSyncColumnResult, H as TDbDefaultValue, Hn as resolveDesignType, Ht as TRelationInfo, I as TDbActionLevel, In as AtscriptDbTable, It as TJsonCopyTarget, J as TDbIndexField, Jn as TRelationFilterTable, Jt as TTableResolver, K as TDbForeignKey, Kn as TRelGuardState, Kt as TSyncIndexesOptions, L as TDbActionProcessor, Ln as IntegrityStrategy, Lt as TMetaResponse, M as TCrudOp, Mn as TViewPlan, Mt as TIdResolveOptions, N as TCrudPermissions, Nn as evaluateExpr, Nt as TIdentification, O as TBulkWriteOptions, On as AtscriptQueryFieldRef, Ot as TFkLookupResolver, P as TDbActionInfo, Pn as isFieldRef, Pt as TIndexChange, Q as TDbInsertIgnoreSlot, Qn as forEachResolvedRelation, Qt as TViewJsonType, R as TDbActionTargetSummary, Rn as NativeIntegrity, Rt as TMetadataOverrides, S as FlatOf, Sn as isViewType, St as TDerivedColumn, T as NullsPlacement, Tn as AtscriptExprNode, Tt as TExistingForeignKey, U as TDbDeleteManyOptions, Un as REL_FILTER_MAX_DEPTH, Ut as TRowResolveOptions, V as TDbDefaultFn, Vn as DbResponse, Vt as TReferencingForeignKey, W as TDbDeleteResult, Wn as REL_FILTER_MAX_NODES, Wt as TSearchIndexInfo, X as TDbInsertIgnoreOptions, Xn as andFilters, Xt as TTransactionOptions, Y as TDbIndexType, Yn as TRelationStaticFilter, Yt as TTouchManyOptions, Z as TDbInsertIgnoreResult, Zn as containsRelationFilter, Zt as TValueFormatterPair, _ as DbPatch, _n as TAdapterFactory, _t as TDbWriteGuard, a as isJsonValueField, an as TableMetadata, ar as FieldMappingStrategy, at as TDbObjectKind, b as FieldOpsFor, bn as TViewColumnMapping, bt as TDeleteOptions, c as resolveCalendarBuckets, cn as TPathPresence, cr as TGenericLogger, ct as TDbRelation, d as AggregateFn, dn as ALL_VIEW_CAPABILITIES, dr as TRowOrderKey, dt as TDbStorageType, en as TWriteTableResolver, er as isResolvedRelationFilter, et as TDbInsertManyResult, f as AggregateQuery, fn as BaseDbAdapter, fr as UniquSelect, ft as TDbUpdateOptions, g as DbControls, gn as DbSpace, gt as TDbWriteCheckContext, h as AtscriptDbWritable, hn as TViewCapability, ht as TDbWriteCheck, i as isBucketableField, in as WithRelation, ir as DocumentFieldMapper, it as TDbLockWait, j as TColumnDiff, jn as TViewJoin, jt as TIdDescriptor, k as TCascadeResolver, kn as AtscriptQueryNode, kt as TFkLookupTarget, l as AggregateControls, ln as ALL_BUCKET_UNITS, lr as TExprAggregate, lt as TDbRemoveGuard, mn as TIndexDiffOptions, mt as TDbWriteAction, n as TComputedSelect, nn as Uniquery, nr as DbEncryption, nt as TDbIsolationLevel, o as jsonValueAncestor, on as isGeoIndexableType, or as TReadControls, ot as TDbReadLock, p as AggregateResult, pn as TForeignKeyDiffOptions, pt as TDbUpdateResult, q as TDbIndex, qn as TRelationFilterJunction, qt as TTableOptionDiff, r as TResolvedBucket, rn as UniqueryControls, rr as TDbEncryptionOptions, rt as TDbLockMode, s as normalizeComputedSelect, sn as isGeoPointType, sr as NoopLogger, st as TDbReferentialAction, t as TBucketFieldSource, tn as TypedWithRelation, tr as relationStaticFilter, tt as TDbInsertResult, u as AggregateExpr, un as ALL_ISOLATION_LEVELS, ur as TFirstLast, ut as TDbRemoveGuardContext, v as DbQuery, vn as TDbSpaceOptions, vt as TDbWriteGuardContext, w as NullableOptional, wn as aliasTargetOf, wt as TExistingColumn, x as FilterExpr, xn as isAtscriptDbView, xt as TDerivedChangeReason, y as DbRow, yn as AtscriptDbView, yt as TDbWriteLimit, z as TDbAvailableActions, zn as TCascadePin, zt as TPrimaryKeyChange } from "./buckets-_iZV39Z3.cjs";
1
+ import { $ as TDbInsertManyIgnoreResult, $n as hasRelationOp, $t as TWriteOptions, A as TCascadeTarget, An as AtscriptRef, At as TForeignKeyChange, B as TDbCollation, Bn as AtscriptDbReadable, Bt as TReadLockOptions, C as NavPropsOf, Cn as TViewReadPlan, Ct as TEnsureTableOptions, D as PrimaryKeyOf, Dn as AtscriptQueryComparison, Dt as TFieldMeta, E as OwnPropsOf, En as AtscriptOrderItem, Et as TExistingTableOption, F as TDbActionIntent, Fn as translateQueryTree, Ft as TInsertOptions, G as TDbFieldMeta, Gn as ResolvedRelationFilter, Gt as TSyncColumnResult, H as TDbDefaultValue, Hn as resolveDesignType, Ht as TRelationInfo, I as TDbActionLevel, In as AtscriptDbTable, It as TJsonCopyTarget, J as TDbIndexField, Jn as TRelationFilterTable, Jt as TTableResolver, K as TDbForeignKey, Kn as TRelGuardState, Kt as TSyncIndexesOptions, L as TDbActionProcessor, Ln as IntegrityStrategy, Lt as TMetaResponse, M as TCrudOp, Mn as TViewPlan, Mt as TIdResolveOptions, N as TCrudPermissions, Nn as evaluateExpr, Nt as TIdentification, O as TBulkWriteOptions, On as AtscriptQueryFieldRef, Ot as TFkLookupResolver, P as TDbActionInfo, Pn as isFieldRef, Pt as TIndexChange, Q as TDbInsertIgnoreSlot, Qn as forEachResolvedRelation, Qt as TViewJsonType, R as TDbActionTargetSummary, Rn as NativeIntegrity, Rt as TMetadataOverrides, S as FlatOf, Sn as isViewType, St as TDerivedColumn, T as NullsPlacement, Tn as AtscriptExprNode, Tt as TExistingForeignKey, U as TDbDeleteManyOptions, Un as REL_FILTER_MAX_DEPTH, Ut as TRowResolveOptions, V as TDbDefaultFn, Vn as DbResponse, Vt as TReferencingForeignKey, W as TDbDeleteResult, Wn as REL_FILTER_MAX_NODES, Wt as TSearchIndexInfo, X as TDbInsertIgnoreOptions, Xn as andFilters, Xt as TTransactionOptions, Y as TDbIndexType, Yn as TRelationStaticFilter, Yt as TTouchManyOptions, Z as TDbInsertIgnoreResult, Zn as containsRelationFilter, Zt as TValueFormatterPair, _ as DbPatch, _n as TAdapterFactory, _t as TDbWriteGuard, a as isJsonValueField, an as TableMetadata, ar as FieldMappingStrategy, at as TDbObjectKind, b as FieldOpsFor, bn as TViewColumnMapping, bt as TDeleteOptions, c as resolveCalendarBuckets, cn as TPathPresence, cr as TGenericLogger, ct as TDbRelation, d as AggregateFn, dn as ALL_VIEW_CAPABILITIES, dr as TRowOrderKey, dt as TDbStorageType, en as TWriteTableResolver, er as isResolvedRelationFilter, et as TDbInsertManyResult, f as AggregateQuery, fn as BaseDbAdapter, fr as UniquSelect, ft as TDbUpdateOptions, g as DbControls, gn as DbSpace, gt as TDbWriteCheckContext, h as AtscriptDbWritable, hn as TViewCapability, ht as TDbWriteCheck, i as isBucketableField, in as WithRelation, ir as DocumentFieldMapper, it as TDbLockWait, j as TColumnDiff, jn as TViewJoin, jt as TIdDescriptor, k as TCascadeResolver, kn as AtscriptQueryNode, kt as TFkLookupTarget, l as AggregateControls, ln as ALL_BUCKET_UNITS, lr as TExprAggregate, lt as TDbRemoveGuard, mn as TIndexDiffOptions, mt as TDbWriteAction, n as TComputedSelect, nn as Uniquery, nr as DbEncryption, nt as TDbIsolationLevel, o as jsonValueAncestor, on as isGeoIndexableType, or as TReadControls, ot as TDbReadLock, p as AggregateResult, pn as TForeignKeyDiffOptions, pt as TDbUpdateResult, q as TDbIndex, qn as TRelationFilterJunction, qt as TTableOptionDiff, r as TResolvedBucket, rn as UniqueryControls, rr as TDbEncryptionOptions, rt as TDbLockMode, s as normalizeComputedSelect, sn as isGeoPointType, sr as NoopLogger, st as TDbReferentialAction, t as TBucketFieldSource, tn as TypedWithRelation, tr as relationStaticFilter, tt as TDbInsertResult, u as AggregateExpr, un as ALL_ISOLATION_LEVELS, ur as TFirstLast, ut as TDbRemoveGuardContext, v as DbQuery, vn as TDbSpaceOptions, vt as TDbWriteGuardContext, w as NullableOptional, wn as aliasTargetOf, wt as TExistingColumn, x as FilterExpr, xn as isAtscriptDbView, xt as TDerivedChangeReason, y as DbRow, yn as AtscriptDbView, yt as TDbWriteLimit, z as TDbAvailableActions, zn as TCascadePin, zt as TPrimaryKeyChange } from "./buckets-B8UOod-v.cjs";
2
2
  import { a as aggregateExpressionsNotSupported, c as isConflict, i as DbErrorCode, l as isRetryableDbError, n as CasMismatchError, o as aggregateFailure, r as DbError, s as bucketTimeZoneUnavailable, t as CasExhaustedError } from "./db-error-B_DRL1E9.cjs";
3
3
  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";
4
4
  import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, s as stableJson, t as deletePath } from "./object-Czia_qD4.cjs";
5
5
  import { c as CalendarBucketLabel, d as WeekStart, g as ALL_AGGREGATE_FNS, l as ComputedExpr, o as BucketExpr, s as BucketUnit, u as ResolvedBucket } from "./agg-42CSpGDR.cjs";
6
6
  import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-wRqMYNBI.cjs";
7
- import { a as buildValidationContext, c as isNavRelation, d as getKeyProps, l as TArrayPatch, n as ValidatorMode, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as TDbPatch } from "./validator-BcBtg8yW.cjs";
7
+ import { a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, l as SERVER_STAMPED_ON_UPDATE_KEYS, n as ValidatorMode, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isServerStampedOnUpdate } from "./validator-DX97RzC2.cjs";
8
8
  import { i as searchMemberKind, r as TSearchMemberKind } from "./search-fields-CHqqcC3W.cjs";
9
- import { c as isColumnTypeChanged, i as fkKey, r as fkColumns } from "./fk-diff-B5jW68T3.cjs";
10
- import { i as tableNameOf } from "./relation-helpers-BAEkP4bH.cjs";
9
+ import { c as isColumnTypeChanged, i as fkKey, r as fkColumns } from "./fk-diff-BNGawZi9.cjs";
10
+ import { i as tableNameOf } from "./relation-helpers-DloMywNs.cjs";
11
11
  import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, RELATION_OPS, RelationOp, RelationOp as RelationOp$1, ResolvedRowOrderKey, ResolvedSelectExpr, Uniquery as Uniquery$1, computeInsights, isPrimitive, isRelationOp, walkFilter } from "@uniqu/core";
12
12
  import { AtscriptExprNode as AtscriptExprNode$1, TAtscriptAnnotatedType } from "@atscript/typescript/utils";
13
13
 
@@ -695,4 +695,4 @@ declare function createChangeRecorder<C>(dryRun: boolean, attempt?: (label: stri
695
695
  */
696
696
  declare function numericOperandProblem(fd: TDbFieldMeta): string | undefined;
697
697
  //#endregion
698
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_ISOLATION_LEVELS, ALL_VIEW_CAPABILITIES, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptExprNode, type AtscriptOrderItem, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type BucketExpr, type BucketUnit, type CalendarBucketLabel, CasExhaustedError, CasMismatchError, type ComputedExpr, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, INTEGER_REGEX_OP, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type NullsPlacement, type OwnPropsOf, type PrimaryKeyOf, RELATION_OPS, REL_FILTER_MAX_DEPTH, REL_FILTER_MAX_NODES, type RelationOp, RelationalFieldMapper, type ResolvedBucket, ResolvedRelationFilter, type TAdapterFactory, type TArrayPatch, type TBucketFieldSource, type TBucketSourceTable, type TBucketSourceVerdict, type TBulkWriteOptions, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteManyOptions, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreOptions, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbIsolationLevel, type TDbLockMode, type TDbLockWait, type TDbObjectKind, type TDbPatch, type TDbReadLock, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateOptions, type TDbUpdateResult, type TDbWriteAction, type TDbWriteCheck, type TDbWriteCheckContext, type TDbWriteGuard, type TDbWriteGuardContext, type TDbWriteLimit, type TDeleteOptions, type TDerivedChangeReason, type TDerivedColumn, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TExprAggregate, type TFieldMeta, type TFieldOps, type TFilterPredicate, type TFilterRef, type TFirstLast, type TFkLookupResolver, type TFkLookupTarget, type TForeignKeyChange, type TForeignKeyDiffOptions, type TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TIndexChange, type TIndexDiffOptions, type TInsertOptions, type TJsonCopyTarget, type TMetaResponse, type TMetadataOverrides, type TPathPresence, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadColumnsKind, type TReadControls, type TReadLockOptions, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSearchMemberKind, type TSyncColumnResult, type TSyncIndexesOptions, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TTransactionOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, type TViewReadPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WeekStart, type WithOptimisticRetryOptions, type WithRelation, acceptedOperatorsHint, aggregateExpressionsNotSupported, aggregateFailure, aliasTargetOf, andFilters, assertGeoPoint, assertNoVersionWrites, bucketSourceVerdict, bucketTimeZoneUnavailable, buildDbValidator, buildValidationContext, canFilterLeaf, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, containsRelationFilter, createChangeRecorder, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, fkKey, forEachResolvedRelation, forceNavNonOptional, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, groupSourceVerdict, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, hasRelationOp, isAtscriptDbView, isBucketableField, isColumnTypeChanged, isConflict, isDbEntityType, isDbFieldOp, isEmptyObject, isFieldRef, isGeoIndexableType, isGeoPointType, isJsonValueField, isNavRelation, isPlainObject, isPrimitive, isRelationOp, isResolvedRelationFilter, isRetryableDbError, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
698
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_ISOLATION_LEVELS, ALL_VIEW_CAPABILITIES, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptExprNode, type AtscriptOrderItem, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type BucketExpr, type BucketUnit, type CalendarBucketLabel, CasExhaustedError, CasMismatchError, type ComputedExpr, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, INTEGER_REGEX_OP, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type NullsPlacement, type OwnPropsOf, type PrimaryKeyOf, RELATION_OPS, REL_FILTER_MAX_DEPTH, REL_FILTER_MAX_NODES, type RelationOp, RelationalFieldMapper, type ResolvedBucket, ResolvedRelationFilter, SERVER_STAMPED_ON_UPDATE_KEYS, type TAdapterFactory, type TArrayPatch, type TBucketFieldSource, type TBucketSourceTable, type TBucketSourceVerdict, type TBulkWriteOptions, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteManyOptions, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreOptions, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbIsolationLevel, type TDbLockMode, type TDbLockWait, type TDbObjectKind, type TDbPatch, type TDbReadLock, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateOptions, type TDbUpdateResult, type TDbWriteAction, type TDbWriteCheck, type TDbWriteCheckContext, type TDbWriteGuard, type TDbWriteGuardContext, type TDbWriteLimit, type TDeleteOptions, type TDerivedChangeReason, type TDerivedColumn, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TExprAggregate, type TFieldMeta, type TFieldOps, type TFilterPredicate, type TFilterRef, type TFirstLast, type TFkLookupResolver, type TFkLookupTarget, type TForeignKeyChange, type TForeignKeyDiffOptions, type TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TIndexChange, type TIndexDiffOptions, type TInsertOptions, type TJsonCopyTarget, type TMetaResponse, type TMetadataOverrides, type TPathPresence, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadColumnsKind, type TReadControls, type TReadLockOptions, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSearchMemberKind, type TSyncColumnResult, type TSyncIndexesOptions, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TTransactionOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, type TViewReadPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WeekStart, type WithOptimisticRetryOptions, type WithRelation, acceptedOperatorsHint, aggregateExpressionsNotSupported, aggregateFailure, aliasTargetOf, andFilters, assertGeoPoint, assertNoVersionWrites, bucketSourceVerdict, bucketTimeZoneUnavailable, buildDbValidator, buildValidationContext, canFilterLeaf, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, containsRelationFilter, createChangeRecorder, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, fkKey, forEachResolvedRelation, forceNavNonOptional, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, groupSourceVerdict, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, hasRelationOp, isAtscriptDbView, isBucketableField, isColumnTypeChanged, isConflict, isDbEntityType, isDbFieldOp, isEmptyObject, isFieldRef, isGeoIndexableType, isGeoPointType, isJsonValueField, isNavRelation, isPlainObject, isPrimitive, isRelationOp, isResolvedRelationFilter, isRetryableDbError, isServerStampedOnUpdate, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
- import { $ as TDbInsertManyIgnoreResult, $n as hasRelationOp, $t as TWriteOptions, A as TCascadeTarget, An as AtscriptRef, At as TForeignKeyChange, B as TDbCollation, Bn as AtscriptDbReadable, Bt as TReadLockOptions, C as NavPropsOf, Cn as TViewReadPlan, Ct as TEnsureTableOptions, D as PrimaryKeyOf, Dn as AtscriptQueryComparison, Dt as TFieldMeta, E as OwnPropsOf, En as AtscriptOrderItem, Et as TExistingTableOption, F as TDbActionIntent, Fn as translateQueryTree, Ft as TInsertOptions, G as TDbFieldMeta, Gn as ResolvedRelationFilter, Gt as TSyncColumnResult, H as TDbDefaultValue, Hn as resolveDesignType, Ht as TRelationInfo, I as TDbActionLevel, In as AtscriptDbTable, It as TJsonCopyTarget, J as TDbIndexField, Jn as TRelationFilterTable, Jt as TTableResolver, K as TDbForeignKey, Kn as TRelGuardState, Kt as TSyncIndexesOptions, L as TDbActionProcessor, Ln as IntegrityStrategy, Lt as TMetaResponse, M as TCrudOp, Mn as TViewPlan, Mt as TIdResolveOptions, N as TCrudPermissions, Nn as evaluateExpr, Nt as TIdentification, O as TBulkWriteOptions, On as AtscriptQueryFieldRef, Ot as TFkLookupResolver, P as TDbActionInfo, Pn as isFieldRef, Pt as TIndexChange, Q as TDbInsertIgnoreSlot, Qn as forEachResolvedRelation, Qt as TViewJsonType, R as TDbActionTargetSummary, Rn as NativeIntegrity, Rt as TMetadataOverrides, S as FlatOf, Sn as isViewType, St as TDerivedColumn, T as NullsPlacement, Tn as AtscriptExprNode, Tt as TExistingForeignKey, U as TDbDeleteManyOptions, Un as REL_FILTER_MAX_DEPTH, Ut as TRowResolveOptions, V as TDbDefaultFn, Vn as DbResponse, Vt as TReferencingForeignKey, W as TDbDeleteResult, Wn as REL_FILTER_MAX_NODES, Wt as TSearchIndexInfo, X as TDbInsertIgnoreOptions, Xn as andFilters, Xt as TTransactionOptions, Y as TDbIndexType, Yn as TRelationStaticFilter, Yt as TTouchManyOptions, Z as TDbInsertIgnoreResult, Zn as containsRelationFilter, Zt as TValueFormatterPair, _ as DbPatch, _n as TAdapterFactory, _t as TDbWriteGuard, a as isJsonValueField, an as TableMetadata, ar as FieldMappingStrategy, at as TDbObjectKind, b as FieldOpsFor, bn as TViewColumnMapping, bt as TDeleteOptions, c as resolveCalendarBuckets, cn as TPathPresence, cr as TGenericLogger, ct as TDbRelation, d as AggregateFn, dn as ALL_VIEW_CAPABILITIES, dr as TRowOrderKey, dt as TDbStorageType, en as TWriteTableResolver, er as isResolvedRelationFilter, et as TDbInsertManyResult, f as AggregateQuery, fn as BaseDbAdapter, fr as UniquSelect, ft as TDbUpdateOptions, g as DbControls, gn as DbSpace, gt as TDbWriteCheckContext, h as AtscriptDbWritable, hn as TViewCapability, ht as TDbWriteCheck, i as isBucketableField, in as WithRelation, ir as DocumentFieldMapper, it as TDbLockWait, j as TColumnDiff, jn as TViewJoin, jt as TIdDescriptor, k as TCascadeResolver, kn as AtscriptQueryNode, kt as TFkLookupTarget, l as AggregateControls, ln as ALL_BUCKET_UNITS, lr as TExprAggregate, lt as TDbRemoveGuard, mn as TIndexDiffOptions, mt as TDbWriteAction, n as TComputedSelect, nn as Uniquery, nr as DbEncryption, nt as TDbIsolationLevel, o as jsonValueAncestor, on as isGeoIndexableType, or as TReadControls, ot as TDbReadLock, p as AggregateResult, pn as TForeignKeyDiffOptions, pt as TDbUpdateResult, q as TDbIndex, qn as TRelationFilterJunction, qt as TTableOptionDiff, r as TResolvedBucket, rn as UniqueryControls, rr as TDbEncryptionOptions, rt as TDbLockMode, s as normalizeComputedSelect, sn as isGeoPointType, sr as NoopLogger, st as TDbReferentialAction, t as TBucketFieldSource, tn as TypedWithRelation, tr as relationStaticFilter, tt as TDbInsertResult, u as AggregateExpr, un as ALL_ISOLATION_LEVELS, ur as TFirstLast, ut as TDbRemoveGuardContext, v as DbQuery, vn as TDbSpaceOptions, vt as TDbWriteGuardContext, w as NullableOptional, wn as aliasTargetOf, wt as TExistingColumn, x as FilterExpr, xn as isAtscriptDbView, xt as TDerivedChangeReason, y as DbRow, yn as AtscriptDbView, yt as TDbWriteLimit, z as TDbAvailableActions, zn as TCascadePin, zt as TPrimaryKeyChange } from "./buckets-DUTcrT4Z.mjs";
1
+ import { $ as TDbInsertManyIgnoreResult, $n as hasRelationOp, $t as TWriteOptions, A as TCascadeTarget, An as AtscriptRef, At as TForeignKeyChange, B as TDbCollation, Bn as AtscriptDbReadable, Bt as TReadLockOptions, C as NavPropsOf, Cn as TViewReadPlan, Ct as TEnsureTableOptions, D as PrimaryKeyOf, Dn as AtscriptQueryComparison, Dt as TFieldMeta, E as OwnPropsOf, En as AtscriptOrderItem, Et as TExistingTableOption, F as TDbActionIntent, Fn as translateQueryTree, Ft as TInsertOptions, G as TDbFieldMeta, Gn as ResolvedRelationFilter, Gt as TSyncColumnResult, H as TDbDefaultValue, Hn as resolveDesignType, Ht as TRelationInfo, I as TDbActionLevel, In as AtscriptDbTable, It as TJsonCopyTarget, J as TDbIndexField, Jn as TRelationFilterTable, Jt as TTableResolver, K as TDbForeignKey, Kn as TRelGuardState, Kt as TSyncIndexesOptions, L as TDbActionProcessor, Ln as IntegrityStrategy, Lt as TMetaResponse, M as TCrudOp, Mn as TViewPlan, Mt as TIdResolveOptions, N as TCrudPermissions, Nn as evaluateExpr, Nt as TIdentification, O as TBulkWriteOptions, On as AtscriptQueryFieldRef, Ot as TFkLookupResolver, P as TDbActionInfo, Pn as isFieldRef, Pt as TIndexChange, Q as TDbInsertIgnoreSlot, Qn as forEachResolvedRelation, Qt as TViewJsonType, R as TDbActionTargetSummary, Rn as NativeIntegrity, Rt as TMetadataOverrides, S as FlatOf, Sn as isViewType, St as TDerivedColumn, T as NullsPlacement, Tn as AtscriptExprNode, Tt as TExistingForeignKey, U as TDbDeleteManyOptions, Un as REL_FILTER_MAX_DEPTH, Ut as TRowResolveOptions, V as TDbDefaultFn, Vn as DbResponse, Vt as TReferencingForeignKey, W as TDbDeleteResult, Wn as REL_FILTER_MAX_NODES, Wt as TSearchIndexInfo, X as TDbInsertIgnoreOptions, Xn as andFilters, Xt as TTransactionOptions, Y as TDbIndexType, Yn as TRelationStaticFilter, Yt as TTouchManyOptions, Z as TDbInsertIgnoreResult, Zn as containsRelationFilter, Zt as TValueFormatterPair, _ as DbPatch, _n as TAdapterFactory, _t as TDbWriteGuard, a as isJsonValueField, an as TableMetadata, ar as FieldMappingStrategy, at as TDbObjectKind, b as FieldOpsFor, bn as TViewColumnMapping, bt as TDeleteOptions, c as resolveCalendarBuckets, cn as TPathPresence, cr as TGenericLogger, ct as TDbRelation, d as AggregateFn, dn as ALL_VIEW_CAPABILITIES, dr as TRowOrderKey, dt as TDbStorageType, en as TWriteTableResolver, er as isResolvedRelationFilter, et as TDbInsertManyResult, f as AggregateQuery, fn as BaseDbAdapter, fr as UniquSelect, ft as TDbUpdateOptions, g as DbControls, gn as DbSpace, gt as TDbWriteCheckContext, h as AtscriptDbWritable, hn as TViewCapability, ht as TDbWriteCheck, i as isBucketableField, in as WithRelation, ir as DocumentFieldMapper, it as TDbLockWait, j as TColumnDiff, jn as TViewJoin, jt as TIdDescriptor, k as TCascadeResolver, kn as AtscriptQueryNode, kt as TFkLookupTarget, l as AggregateControls, ln as ALL_BUCKET_UNITS, lr as TExprAggregate, lt as TDbRemoveGuard, mn as TIndexDiffOptions, mt as TDbWriteAction, n as TComputedSelect, nn as Uniquery, nr as DbEncryption, nt as TDbIsolationLevel, o as jsonValueAncestor, on as isGeoIndexableType, or as TReadControls, ot as TDbReadLock, p as AggregateResult, pn as TForeignKeyDiffOptions, pt as TDbUpdateResult, q as TDbIndex, qn as TRelationFilterJunction, qt as TTableOptionDiff, r as TResolvedBucket, rn as UniqueryControls, rr as TDbEncryptionOptions, rt as TDbLockMode, s as normalizeComputedSelect, sn as isGeoPointType, sr as NoopLogger, st as TDbReferentialAction, t as TBucketFieldSource, tn as TypedWithRelation, tr as relationStaticFilter, tt as TDbInsertResult, u as AggregateExpr, un as ALL_ISOLATION_LEVELS, ur as TFirstLast, ut as TDbRemoveGuardContext, v as DbQuery, vn as TDbSpaceOptions, vt as TDbWriteGuardContext, w as NullableOptional, wn as aliasTargetOf, wt as TExistingColumn, x as FilterExpr, xn as isAtscriptDbView, xt as TDerivedChangeReason, y as DbRow, yn as AtscriptDbView, yt as TDbWriteLimit, z as TDbAvailableActions, zn as TCascadePin, zt as TPrimaryKeyChange } from "./buckets-CHyspjYP.mjs";
2
2
  import { a as aggregateExpressionsNotSupported, c as isConflict, i as DbErrorCode, l as isRetryableDbError, n as CasMismatchError, o as aggregateFailure, r as DbError, s as bucketTimeZoneUnavailable, t as CasExhaustedError } from "./db-error-B_DRL1E9.mjs";
3
3
  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";
4
4
  import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, s as stableJson, t as deletePath } from "./object-Czia_qD4.mjs";
5
5
  import { c as CalendarBucketLabel, d as WeekStart, g as ALL_AGGREGATE_FNS, l as ComputedExpr, o as BucketExpr, s as BucketUnit, u as ResolvedBucket } from "./agg-Wo-smrYV.mjs";
6
6
  import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-wRqMYNBI.mjs";
7
- import { a as buildValidationContext, c as isNavRelation, d as getKeyProps, l as TArrayPatch, n as ValidatorMode, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as TDbPatch } from "./validator-BcBtg8yW.mjs";
7
+ import { a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, l as SERVER_STAMPED_ON_UPDATE_KEYS, n as ValidatorMode, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isServerStampedOnUpdate } from "./validator-DX97RzC2.mjs";
8
8
  import { i as searchMemberKind, r as TSearchMemberKind } from "./search-fields-CHqqcC3W.mjs";
9
- import { c as isColumnTypeChanged, i as fkKey, r as fkColumns } from "./fk-diff-PhVBYohc.mjs";
10
- import { i as tableNameOf } from "./relation-helpers-BSYwxOSA.mjs";
9
+ import { c as isColumnTypeChanged, i as fkKey, r as fkColumns } from "./fk-diff-rj9N2QLw.mjs";
10
+ import { i as tableNameOf } from "./relation-helpers-zwt19E7r.mjs";
11
11
  import { AtscriptExprNode as AtscriptExprNode$1, TAtscriptAnnotatedType } from "@atscript/typescript/utils";
12
12
  import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, RELATION_OPS, RelationOp, RelationOp as RelationOp$1, ResolvedRowOrderKey, ResolvedSelectExpr, Uniquery as Uniquery$1, computeInsights, isPrimitive, isRelationOp, walkFilter } from "@uniqu/core";
13
13
 
@@ -695,4 +695,4 @@ declare function createChangeRecorder<C>(dryRun: boolean, attempt?: (label: stri
695
695
  */
696
696
  declare function numericOperandProblem(fd: TDbFieldMeta): string | undefined;
697
697
  //#endregion
698
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_ISOLATION_LEVELS, ALL_VIEW_CAPABILITIES, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptExprNode, type AtscriptOrderItem, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type BucketExpr, type BucketUnit, type CalendarBucketLabel, CasExhaustedError, CasMismatchError, type ComputedExpr, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, INTEGER_REGEX_OP, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type NullsPlacement, type OwnPropsOf, type PrimaryKeyOf, RELATION_OPS, REL_FILTER_MAX_DEPTH, REL_FILTER_MAX_NODES, type RelationOp, RelationalFieldMapper, type ResolvedBucket, ResolvedRelationFilter, type TAdapterFactory, type TArrayPatch, type TBucketFieldSource, type TBucketSourceTable, type TBucketSourceVerdict, type TBulkWriteOptions, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteManyOptions, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreOptions, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbIsolationLevel, type TDbLockMode, type TDbLockWait, type TDbObjectKind, type TDbPatch, type TDbReadLock, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateOptions, type TDbUpdateResult, type TDbWriteAction, type TDbWriteCheck, type TDbWriteCheckContext, type TDbWriteGuard, type TDbWriteGuardContext, type TDbWriteLimit, type TDeleteOptions, type TDerivedChangeReason, type TDerivedColumn, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TExprAggregate, type TFieldMeta, type TFieldOps, type TFilterPredicate, type TFilterRef, type TFirstLast, type TFkLookupResolver, type TFkLookupTarget, type TForeignKeyChange, type TForeignKeyDiffOptions, type TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TIndexChange, type TIndexDiffOptions, type TInsertOptions, type TJsonCopyTarget, type TMetaResponse, type TMetadataOverrides, type TPathPresence, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadColumnsKind, type TReadControls, type TReadLockOptions, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSearchMemberKind, type TSyncColumnResult, type TSyncIndexesOptions, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TTransactionOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, type TViewReadPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WeekStart, type WithOptimisticRetryOptions, type WithRelation, acceptedOperatorsHint, aggregateExpressionsNotSupported, aggregateFailure, aliasTargetOf, andFilters, assertGeoPoint, assertNoVersionWrites, bucketSourceVerdict, bucketTimeZoneUnavailable, buildDbValidator, buildValidationContext, canFilterLeaf, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, containsRelationFilter, createChangeRecorder, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, fkKey, forEachResolvedRelation, forceNavNonOptional, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, groupSourceVerdict, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, hasRelationOp, isAtscriptDbView, isBucketableField, isColumnTypeChanged, isConflict, isDbEntityType, isDbFieldOp, isEmptyObject, isFieldRef, isGeoIndexableType, isGeoPointType, isJsonValueField, isNavRelation, isPlainObject, isPrimitive, isRelationOp, isResolvedRelationFilter, isRetryableDbError, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
698
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_ISOLATION_LEVELS, ALL_VIEW_CAPABILITIES, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptExprNode, type AtscriptOrderItem, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type BucketExpr, type BucketUnit, type CalendarBucketLabel, CasExhaustedError, CasMismatchError, type ComputedExpr, DEFAULT_DB_SPACE, type DbControls, DbEncryption, DbError, type DbErrorCode, type DbPatch, type DbQuery, type DbResponse, type DbRow, DbSpace, type DbValidationContext, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, type FlatOf, INTEGER_REGEX_OP, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, type NullsPlacement, type OwnPropsOf, type PrimaryKeyOf, RELATION_OPS, REL_FILTER_MAX_DEPTH, REL_FILTER_MAX_NODES, type RelationOp, RelationalFieldMapper, type ResolvedBucket, ResolvedRelationFilter, SERVER_STAMPED_ON_UPDATE_KEYS, type TAdapterFactory, type TArrayPatch, type TBucketFieldSource, type TBucketSourceTable, type TBucketSourceVerdict, type TBulkWriteOptions, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbCas, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteManyOptions, type TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreOptions, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbIsolationLevel, type TDbLockMode, type TDbLockWait, type TDbObjectKind, type TDbPatch, type TDbReadLock, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateOptions, type TDbUpdateResult, type TDbWriteAction, type TDbWriteCheck, type TDbWriteCheckContext, type TDbWriteGuard, type TDbWriteGuardContext, type TDbWriteLimit, type TDeleteOptions, type TDerivedChangeReason, type TDerivedColumn, type TEnsureTableOptions, type TExistingColumn, type TExistingForeignKey, type TExistingTableOption, type TExprAggregate, type TFieldMeta, type TFieldOps, type TFilterPredicate, type TFilterRef, type TFirstLast, type TFkLookupResolver, type TFkLookupTarget, type TForeignKeyChange, type TForeignKeyDiffOptions, type TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TIndexChange, type TIndexDiffOptions, type TInsertOptions, type TJsonCopyTarget, type TMetaResponse, type TMetadataOverrides, type TPathPresence, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadColumnsKind, type TReadControls, type TReadLockOptions, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSearchMemberKind, type TSyncColumnResult, type TSyncIndexesOptions, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TTransactionOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, type TViewReadPlan, type TWriteOptions, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WeekStart, type WithOptimisticRetryOptions, type WithRelation, acceptedOperatorsHint, aggregateExpressionsNotSupported, aggregateFailure, aliasTargetOf, andFilters, assertGeoPoint, assertNoVersionWrites, bucketSourceVerdict, bucketTimeZoneUnavailable, buildDbValidator, buildValidationContext, canFilterLeaf, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, containsRelationFilter, createChangeRecorder, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, fkKey, forEachResolvedRelation, forceNavNonOptional, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, groupSourceVerdict, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, hasRelationOp, isAtscriptDbView, isBucketableField, isColumnTypeChanged, isConflict, isDbEntityType, isDbFieldOp, isEmptyObject, isFieldRef, isGeoIndexableType, isGeoPointType, isJsonValueField, isNavRelation, isPlainObject, isPrimitive, isRelationOp, isResolvedRelationFilter, isRetryableDbError, isServerStampedOnUpdate, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
package/dist/index.mjs CHANGED
@@ -1,9 +1,10 @@
1
1
  import { a as aggregateExpressionsNotSupported, c as invalidQuery, d as spaceClosedError, l as isConflict, n as CasMismatchError, o as aggregateFailure, r as DbError, s as bucketTimeZoneUnavailable, t as CasExhaustedError, u as isRetryableDbError } from "./db-error-hraC12B9.mjs";
2
- import { $ as narrowerFilterOps, B as acceptedOperatorsHint, C as ALL_VIEW_CAPABILITIES, E as createFailureCollector, F as geoIndexNotFoundMessage, G as classifyQueryPath, H as bucketSourceVerdict, I as searchIndexNotFoundMessage, J as guardAggregate, K as collectQueryPaths, L as vectorIndexNotFoundMessage, M as NativeIntegrity, N as AtscriptDbReadable, O as fkColumns, P as resolveDesignType, Q as guardQuery, R as ADAPTER_FILTER_REASON, S as ALL_ISOLATION_LEVELS, St as NoopLogger, T as createChangeRecorder, U as canFilterLeaf, V as assertGeoPoint, W as checkHavingKeys, X as guardPath, Y as guardFilter, Z as guardPaths, _ as isVersionExemptPatch, _t as isBucketableField, at as UniquSelect, b as ApplicationIntegrity, bt as normalizeComputedSelect, ct as defaultFulltextIndex, dt as splitFulltextFields, et as sortFieldNames, ft as TableMetadata, g as AtscriptDbTable, gt as aliasTargetOf, h as isViewType, it as FieldMappingStrategy, j as IntegrityStrategy, k as fkKey, lt as describeFulltext, m as isAtscriptDbView, mt as isGeoPointType, n as isColumnTypeChanged, nt as RelationalFieldMapper, ot as numericOperandProblem, p as AtscriptDbView, pt as isGeoIndexableType, q as groupSourceVerdict, rt as DocumentFieldMapper, st as INTEGER_REGEX_OP, tt as unsupportedOperatorMessage, ut as searchTermInteger, v as assertNoVersionWrites, vt as isJsonValueField, w as BaseDbAdapter, x as ALL_BUCKET_UNITS, xt as resolveCalendarBuckets, y as decomposePatch, yt as jsonValueAncestor, z as ENCRYPTED_REASON } from "./column-diff-pdn53AIj.mjs";
2
+ import { $ as narrowerFilterOps, B as acceptedOperatorsHint, C as ALL_VIEW_CAPABILITIES, E as createFailureCollector, F as geoIndexNotFoundMessage, G as classifyQueryPath, H as bucketSourceVerdict, I as searchIndexNotFoundMessage, J as guardAggregate, K as collectQueryPaths, L as vectorIndexNotFoundMessage, M as NativeIntegrity, N as AtscriptDbReadable, O as fkColumns, P as resolveDesignType, Q as guardQuery, R as ADAPTER_FILTER_REASON, S as ALL_ISOLATION_LEVELS, St as NoopLogger, T as createChangeRecorder, U as canFilterLeaf, V as assertGeoPoint, W as checkHavingKeys, X as guardPath, Y as guardFilter, Z as guardPaths, _ as isVersionExemptPatch, _t as isBucketableField, at as UniquSelect, b as ApplicationIntegrity, bt as normalizeComputedSelect, ct as defaultFulltextIndex, dt as splitFulltextFields, et as sortFieldNames, ft as TableMetadata, g as AtscriptDbTable, gt as aliasTargetOf, h as isViewType, it as FieldMappingStrategy, j as IntegrityStrategy, k as fkKey, lt as describeFulltext, m as isAtscriptDbView, mt as isGeoPointType, n as isColumnTypeChanged, nt as RelationalFieldMapper, ot as numericOperandProblem, p as AtscriptDbView, pt as isGeoIndexableType, q as groupSourceVerdict, rt as DocumentFieldMapper, st as INTEGER_REGEX_OP, tt as unsupportedOperatorMessage, ut as searchTermInteger, v as assertNoVersionWrites, vt as isJsonValueField, w as BaseDbAdapter, x as ALL_BUCKET_UNITS, xt as resolveCalendarBuckets, y as decomposePatch, yt as jsonValueAncestor, z as ENCRYPTED_REASON } from "./column-diff-BfNIlMwX.mjs";
3
3
  import { n as ALL_AGGREGATE_FNS } from "./aggregate-fns-DsS9UQVB.mjs";
4
4
  import { A as hasRelationOp, C as REL_FILTER_MAX_DEPTH, D as containsRelationFilter, E as andFilters, G as evaluateExpr, H as tableNameOf, K as isFieldRef, P as relationStaticFilter, S as uniqueKeyTuple, T as ResolvedRelationFilter, j as isResolvedRelationFilter, k as forEachResolvedRelation, q as translateQueryTree, w as REL_FILTER_MAX_NODES } from "./nested-writer-ClUX0DB0.mjs";
5
5
  import { a as forceNavNonOptional, c as getKeyProps, o as isNavRelation, r as buildValidationContext, s as createDbValidatorPlugin, t as buildDbValidator } from "./validator-DuDWsIdQ.mjs";
6
- import { a as searchMemberKind, s as DB_ENTITY_ANNOTATIONS } from "./search-fields-0U0FAFGj.mjs";
6
+ import { n as isServerStampedOnUpdate, t as SERVER_STAMPED_ON_UPDATE_KEYS } from "./server-stamped-BoP56K9M.mjs";
7
+ import { a as searchMemberKind, s as DB_ENTITY_ANNOTATIONS } from "./search-fields-BPNsxrCk.mjs";
7
8
  import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, s as stableJson, t as deletePath } from "./object-PQ1J8jri.mjs";
8
9
  import { t as DEFAULT_DB_SPACE } from "./consts-C_-5_pFq.mjs";
9
10
  import { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, getDbFieldOp, isDbFieldOp, reconcileCas, separateCas, separateFieldOps } from "./ops.mjs";
@@ -557,4 +558,4 @@ function isDbEntityType(value) {
557
558
  return DB_ENTITY_ANNOTATIONS.some((name) => value.metadata.has(name));
558
559
  }
559
560
  //#endregion
560
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_ISOLATION_LEVELS, ALL_VIEW_CAPABILITIES, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, BaseDbAdapter, CasExhaustedError, CasMismatchError, DEFAULT_DB_SPACE, DbEncryption, DbError, DbSpace, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, INTEGER_REGEX_OP, IntegrityStrategy, NativeIntegrity, NoopLogger, RELATION_OPS, REL_FILTER_MAX_DEPTH, REL_FILTER_MAX_NODES, RelationalFieldMapper, ResolvedRelationFilter, TableMetadata, UniquSelect, acceptedOperatorsHint, aggregateExpressionsNotSupported, aggregateFailure, aliasTargetOf, andFilters, assertGeoPoint, assertNoVersionWrites, bucketSourceVerdict, bucketTimeZoneUnavailable, buildDbValidator, buildValidationContext, canFilterLeaf, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, containsRelationFilter, createChangeRecorder, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, fkKey, forEachResolvedRelation, forceNavNonOptional, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, groupSourceVerdict, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, hasRelationOp, isAtscriptDbView, isBucketableField, isColumnTypeChanged, isConflict, isDbEntityType, isDbFieldOp, isEmptyObject, isFieldRef, isGeoIndexableType, isGeoPointType, isJsonValueField, isNavRelation, isPlainObject, isPrimitive, isRelationOp, isResolvedRelationFilter, isRetryableDbError, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
561
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_ISOLATION_LEVELS, ALL_VIEW_CAPABILITIES, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, BaseDbAdapter, CasExhaustedError, CasMismatchError, DEFAULT_DB_SPACE, DbEncryption, DbError, DbSpace, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, INTEGER_REGEX_OP, IntegrityStrategy, NativeIntegrity, NoopLogger, RELATION_OPS, REL_FILTER_MAX_DEPTH, REL_FILTER_MAX_NODES, RelationalFieldMapper, ResolvedRelationFilter, SERVER_STAMPED_ON_UPDATE_KEYS, TableMetadata, UniquSelect, acceptedOperatorsHint, aggregateExpressionsNotSupported, aggregateFailure, aliasTargetOf, andFilters, assertGeoPoint, assertNoVersionWrites, bucketSourceVerdict, bucketTimeZoneUnavailable, buildDbValidator, buildValidationContext, canFilterLeaf, checkHavingKeys, classifyQueryPath, collectQueryPaths, computeInsights, containsRelationFilter, createChangeRecorder, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, fkKey, forEachResolvedRelation, forceNavNonOptional, geoIndexNotFoundMessage, getDbFieldOp, getKeyProps, getPath, groupSourceVerdict, guardAggregate, guardFilter, guardPath, guardPaths, guardQuery, hasRelationOp, isAtscriptDbView, isBucketableField, isColumnTypeChanged, isConflict, isDbEntityType, isDbFieldOp, isEmptyObject, isFieldRef, isGeoIndexableType, isGeoPointType, isJsonValueField, isNavRelation, isPlainObject, isPrimitive, isRelationOp, isResolvedRelationFilter, isRetryableDbError, isServerStampedOnUpdate, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
package/dist/plugin.cjs CHANGED
@@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  }) : target, mod));
35
35
  //#endregion
36
36
  const require_aggregate_fns = require("./aggregate-fns-DupYzFD7.cjs");
37
- const require_search_fields = require("./search-fields-Bi1n-pB1.cjs");
37
+ const require_search_fields = require("./search-fields-B49-RCWd.cjs");
38
38
  require("./consts-BzRfCcH2.cjs");
39
- const require_view_validation = require("./view-validation-D50KWU7O.cjs");
39
+ const require_view_validation = require("./view-validation-BiDLCYMw.cjs");
40
40
  let _atscript_core = require("@atscript/core");
41
41
  let node_path = require("node:path");
42
42
  node_path = __toESM(node_path, 1);
package/dist/plugin.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as NULL_WHEN_EMPTY_AGGREGATE_FNS, t as AGG_ANNOTATIONS } from "./aggregate-fns-DsS9UQVB.mjs";
2
- import { c as DERIVED_INCOMPATIBLE, l as JSON_LEAF_TYPES, o as numericTypeProblem, s as DB_ENTITY_ANNOTATIONS, t as ENCRYPTED_INCOMPATIBLE } from "./search-fields-0U0FAFGj.mjs";
2
+ import { c as DERIVED_INCOMPATIBLE, l as JSON_LEAF_TYPES, o as numericTypeProblem, s as DB_ENTITY_ANNOTATIONS, t as ENCRYPTED_INCOMPATIBLE } from "./search-fields-BPNsxrCk.mjs";
3
3
  import "./consts-C_-5_pFq.mjs";
4
- import { A as getParentTypeName, B as validateSiblingStringField, C as viewJoins, D as getDbTableOwner, E as getAnnotationAlias, F as refActionAnnotation, I as searchFieldVerdict, L as validateExclusiveWith, M as isNullableUnion, O as getNavTargetTypeName, P as primitiveBaseType, R as validateFieldBaseType, S as validateRefArgument, T as effectiveAnnotationNames, _ as hasAnyViewAnnotation, c as refuseCiphertext, d as viewFieldSeals, f as viewProps, g as forEachFieldRef, h as findViewCycle, i as encryptedTypeSearchProblem, j as integerMemberIndexProblem, k as getParentStruct, l as sealedSearchProblem, m as findFKFieldsPointingTo, o as isNavProp, p as earlierJoinTargets, s as jsonChainInfo, u as validateViewInterface, v as isAliasDecl, w as viewScopeTypes, x as validateQueryScope, y as isDbSourceDecl, z as validateIncompatible } from "./view-validation-QbqqXEAM.mjs";
4
+ import { A as getParentTypeName, B as validateSiblingStringField, C as viewJoins, D as getDbTableOwner, E as getAnnotationAlias, F as refActionAnnotation, I as searchFieldVerdict, L as validateExclusiveWith, M as isNullableUnion, O as getNavTargetTypeName, P as primitiveBaseType, R as validateFieldBaseType, S as validateRefArgument, T as effectiveAnnotationNames, _ as hasAnyViewAnnotation, c as refuseCiphertext, d as viewFieldSeals, f as viewProps, g as forEachFieldRef, h as findViewCycle, i as encryptedTypeSearchProblem, j as integerMemberIndexProblem, k as getParentStruct, l as sealedSearchProblem, m as findFKFieldsPointingTo, o as isNavProp, p as earlierJoinTargets, s as jsonChainInfo, u as validateViewInterface, v as isAliasDecl, w as viewScopeTypes, x as validateQueryScope, y as isDbSourceDecl, z as validateIncompatible } from "./view-validation-BcgDq7M9.mjs";
5
5
  import { AnnotationSpec, DEFAULT_FORMAT, annotationExample, getFieldsForType, isArray, isInterface, isPrimitive, isProp, isQueryComparison, isQueryLogical, isRef, isStructure } from "@atscript/core";
6
6
  import path from "node:path";
7
7
  import { fileURLToPath } from "node:url";
package/dist/rel.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { Jt as TTableResolver, K as TDbForeignKey, an as TableMetadata, cr as TGenericLogger, ct as TDbRelation, en as TWriteTableResolver, fn as BaseDbAdapter, h as AtscriptDbWritable, m as AtscriptDbTableLike } from "./buckets-_iZV39Z3.cjs";
1
+ import { Jt as TTableResolver, K as TDbForeignKey, an as TableMetadata, cr as TGenericLogger, ct as TDbRelation, en as TWriteTableResolver, fn as BaseDbAdapter, h as AtscriptDbWritable, m as AtscriptDbTableLike } from "./buckets-B8UOod-v.cjs";
2
2
  import { t as DbValidationContext } from "./db-validator-plugin-wRqMYNBI.cjs";
3
- import { n as findRemoteFK, r as resolveRelationTargetTable, t as findFKForRelation } from "./relation-helpers-BAEkP4bH.cjs";
3
+ import { n as findRemoteFK, r as resolveRelationTargetTable, t as findFKForRelation } from "./relation-helpers-DloMywNs.cjs";
4
4
  import { FilterExpr, WithRelation } from "@uniqu/core";
5
5
  import { Validator } from "@atscript/typescript/utils";
6
6
 
package/dist/rel.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { Jt as TTableResolver, K as TDbForeignKey, an as TableMetadata, cr as TGenericLogger, ct as TDbRelation, en as TWriteTableResolver, fn as BaseDbAdapter, h as AtscriptDbWritable, m as AtscriptDbTableLike } from "./buckets-DUTcrT4Z.mjs";
1
+ import { Jt as TTableResolver, K as TDbForeignKey, an as TableMetadata, cr as TGenericLogger, ct as TDbRelation, en as TWriteTableResolver, fn as BaseDbAdapter, h as AtscriptDbWritable, m as AtscriptDbTableLike } from "./buckets-CHyspjYP.mjs";
2
2
  import { t as DbValidationContext } from "./db-validator-plugin-wRqMYNBI.mjs";
3
- import { n as findRemoteFK, r as resolveRelationTargetTable, t as findFKForRelation } from "./relation-helpers-BSYwxOSA.mjs";
3
+ import { n as findRemoteFK, r as resolveRelationTargetTable, t as findFKForRelation } from "./relation-helpers-zwt19E7r.mjs";
4
4
  import { Validator } from "@atscript/typescript/utils";
5
5
  import { FilterExpr, WithRelation } from "@uniqu/core";
6
6
 
@@ -1,4 +1,4 @@
1
- import { K as TDbForeignKey, ct as TDbRelation } from "./buckets-_iZV39Z3.cjs";
1
+ import { K as TDbForeignKey, ct as TDbRelation } from "./buckets-B8UOod-v.cjs";
2
2
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
3
3
 
4
4
  //#region src/rel/relation-helpers.d.ts
@@ -1,4 +1,4 @@
1
- import { K as TDbForeignKey, ct as TDbRelation } from "./buckets-DUTcrT4Z.mjs";
1
+ import { K as TDbForeignKey, ct as TDbRelation } from "./buckets-CHyspjYP.mjs";
2
2
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
3
3
 
4
4
  //#region src/rel/relation-helpers.d.ts
@@ -1,3 +1,4 @@
1
+ const require_server_stamped = require("./server-stamped-B6XbUQ4p.cjs");
1
2
  //#region src/shared/derived-rules.ts
2
3
  /**
3
4
  * The rules the compiler plugin and the runtime share about entities and
@@ -29,8 +30,7 @@ const DERIVED_INCOMPATIBLE = [
29
30
  ["db.default.increment", "the value is computed, never defaulted"],
30
31
  ["db.default.uuid", "the value is computed, never defaulted"],
31
32
  ["db.default.now", "the value is computed, never defaulted"],
32
- ["db.onUpdate.now", "a derived column is never written"],
33
- ["db.onUpdate.inc", "a derived column is never written"],
33
+ ...[...require_server_stamped.SERVER_STAMPED_ON_UPDATE_KEYS].map((key) => [key, "a derived column is never written"]),
34
34
  ["db.column.version", "the version column is adapter-managed"],
35
35
  ["db.column.version.exempt", "a derived column is never written"],
36
36
  ["db.encrypted", "the value is a cleartext extraction of its source"],
@@ -1,3 +1,4 @@
1
+ import { t as SERVER_STAMPED_ON_UPDATE_KEYS } from "./server-stamped-BoP56K9M.mjs";
1
2
  //#region src/shared/derived-rules.ts
2
3
  /**
3
4
  * The rules the compiler plugin and the runtime share about entities and
@@ -29,8 +30,7 @@ const DERIVED_INCOMPATIBLE = [
29
30
  ["db.default.increment", "the value is computed, never defaulted"],
30
31
  ["db.default.uuid", "the value is computed, never defaulted"],
31
32
  ["db.default.now", "the value is computed, never defaulted"],
32
- ["db.onUpdate.now", "a derived column is never written"],
33
- ["db.onUpdate.inc", "a derived column is never written"],
33
+ ...[...SERVER_STAMPED_ON_UPDATE_KEYS].map((key) => [key, "a derived column is never written"]),
34
34
  ["db.column.version", "the version column is adapter-managed"],
35
35
  ["db.column.version.exempt", "a derived column is never written"],
36
36
  ["db.encrypted", "the value is a cleartext extraction of its source"],
@@ -0,0 +1,33 @@
1
+ //#region src/shared/server-stamped.ts
2
+ /**
3
+ * The annotations whose field the server writes on every update — the write
4
+ * sets `@db.onUpdate.now` to the current time and increments
5
+ * `@db.onUpdate.inc` — so a client value is overwritten (now) or dropped
6
+ * (inc). Dependency-free: UI and plugin code can import it from
7
+ * `@atscript/db/validator` without pulling the compiler into a bundle.
8
+ * @since 0.1.163
9
+ */
10
+ const SERVER_STAMPED_ON_UPDATE_KEYS = new Set(["db.onUpdate.now", "db.onUpdate.inc"]);
11
+ /**
12
+ * Whether a field's metadata marks it as stamped by the server on every
13
+ * update (`@db.onUpdate.now` or `@db.onUpdate.inc`) — e.g. to render it
14
+ * read-only in an edit form.
15
+ * @since 0.1.163
16
+ */
17
+ function isServerStampedOnUpdate(metadata) {
18
+ for (const key of SERVER_STAMPED_ON_UPDATE_KEYS) if (metadata.has(key)) return true;
19
+ return false;
20
+ }
21
+ //#endregion
22
+ Object.defineProperty(exports, "SERVER_STAMPED_ON_UPDATE_KEYS", {
23
+ enumerable: true,
24
+ get: function() {
25
+ return SERVER_STAMPED_ON_UPDATE_KEYS;
26
+ }
27
+ });
28
+ Object.defineProperty(exports, "isServerStampedOnUpdate", {
29
+ enumerable: true,
30
+ get: function() {
31
+ return isServerStampedOnUpdate;
32
+ }
33
+ });
@@ -0,0 +1,22 @@
1
+ //#region src/shared/server-stamped.ts
2
+ /**
3
+ * The annotations whose field the server writes on every update — the write
4
+ * sets `@db.onUpdate.now` to the current time and increments
5
+ * `@db.onUpdate.inc` — so a client value is overwritten (now) or dropped
6
+ * (inc). Dependency-free: UI and plugin code can import it from
7
+ * `@atscript/db/validator` without pulling the compiler into a bundle.
8
+ * @since 0.1.163
9
+ */
10
+ const SERVER_STAMPED_ON_UPDATE_KEYS = new Set(["db.onUpdate.now", "db.onUpdate.inc"]);
11
+ /**
12
+ * Whether a field's metadata marks it as stamped by the server on every
13
+ * update (`@db.onUpdate.now` or `@db.onUpdate.inc`) — e.g. to render it
14
+ * read-only in an edit form.
15
+ * @since 0.1.163
16
+ */
17
+ function isServerStampedOnUpdate(metadata) {
18
+ for (const key of SERVER_STAMPED_ON_UPDATE_KEYS) if (metadata.has(key)) return true;
19
+ return false;
20
+ }
21
+ //#endregion
22
+ export { isServerStampedOnUpdate as n, SERVER_STAMPED_ON_UPDATE_KEYS as t };
package/dist/shared.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_search_fields = require("./search-fields-Bi1n-pB1.cjs");
2
+ const require_search_fields = require("./search-fields-B49-RCWd.cjs");
3
3
  const require_object = require("./object-GjsuPNqo.cjs");
4
4
  const require_aggregate_rules = require("./aggregate-rules-D_bsCpUI.cjs");
5
- const require_view_validation = require("./view-validation-D50KWU7O.cjs");
5
+ const require_view_validation = require("./view-validation-BiDLCYMw.cjs");
6
6
  exports.ENCRYPTED_INCOMPATIBLE = require_search_fields.ENCRYPTED_INCOMPATIBLE;
7
7
  exports.ENCRYPTED_SEARCH_FEATURES = require_search_fields.ENCRYPTED_SEARCH_FEATURES;
8
8
  exports.NAV_ANNOTATIONS = require_view_validation.NAV_ANNOTATIONS;
package/dist/shared.d.cts CHANGED
@@ -11,7 +11,7 @@ import { AnnotationSpec, AtscriptDoc, SemanticInterfaceNode, SemanticNode, Seman
11
11
  * a runtime metadata check read this, not the own-only `countAnnotations`.
12
12
  * @since 0.1.162
13
13
  */
14
- declare function effectiveAnnotationNames(field: SemanticNode, doc: AtscriptDoc): Set<string>;
14
+ declare function effectiveAnnotationNames(field: SemanticNode, doc?: AtscriptDoc): Set<string>;
15
15
  /**
16
16
  * Asserts the field carrying this annotation does not also carry any of
17
17
  * `others` — its own or inherited through its type ref (since 0.1.162).
@@ -19,7 +19,7 @@ declare function effectiveAnnotationNames(field: SemanticNode, doc: AtscriptDoc)
19
19
  declare function validateExclusiveWith(token: Token, selfName: string, others: Array<{
20
20
  key: string;
21
21
  displayName?: string;
22
- }>, doc: AtscriptDoc): TMessages;
22
+ }>, doc?: AtscriptDoc): TMessages;
23
23
  /**
24
24
  * Reports each of `pairs` (`[annotation, why]`) the field carrying `token`
25
25
  * also carries — its own or inherited through its type ref (the field's
@@ -27,7 +27,7 @@ declare function validateExclusiveWith(token: Token, selfName: string, others: A
27
27
  * `${tag} cannot coexist with @${annotation} — ${why}`.
28
28
  * @since 0.1.162
29
29
  */
30
- declare function validateIncompatible(token: Token, tag: string, pairs: ReadonlyArray<readonly [annotation: string, why: string]>, doc: AtscriptDoc): TMessages;
30
+ declare function validateIncompatible(token: Token, tag: string, pairs: ReadonlyArray<readonly [annotation: string, why: string]>, doc?: AtscriptDoc): TMessages;
31
31
  /** Whether a prop is a field of a view interface (`@db.view` / `@db.view.for`). */
32
32
  declare function isViewField(field: SemanticNode): boolean;
33
33
  /** Primitive base type (`string`, `number`, `decimal`, …) of a resolved definition, if it is a primitive. */
package/dist/shared.d.mts CHANGED
@@ -11,7 +11,7 @@ import { AnnotationSpec, AtscriptDoc, SemanticInterfaceNode, SemanticNode, Seman
11
11
  * a runtime metadata check read this, not the own-only `countAnnotations`.
12
12
  * @since 0.1.162
13
13
  */
14
- declare function effectiveAnnotationNames(field: SemanticNode, doc: AtscriptDoc): Set<string>;
14
+ declare function effectiveAnnotationNames(field: SemanticNode, doc?: AtscriptDoc): Set<string>;
15
15
  /**
16
16
  * Asserts the field carrying this annotation does not also carry any of
17
17
  * `others` — its own or inherited through its type ref (since 0.1.162).
@@ -19,7 +19,7 @@ declare function effectiveAnnotationNames(field: SemanticNode, doc: AtscriptDoc)
19
19
  declare function validateExclusiveWith(token: Token, selfName: string, others: Array<{
20
20
  key: string;
21
21
  displayName?: string;
22
- }>, doc: AtscriptDoc): TMessages;
22
+ }>, doc?: AtscriptDoc): TMessages;
23
23
  /**
24
24
  * Reports each of `pairs` (`[annotation, why]`) the field carrying `token`
25
25
  * also carries — its own or inherited through its type ref (the field's
@@ -27,7 +27,7 @@ declare function validateExclusiveWith(token: Token, selfName: string, others: A
27
27
  * `${tag} cannot coexist with @${annotation} — ${why}`.
28
28
  * @since 0.1.162
29
29
  */
30
- declare function validateIncompatible(token: Token, tag: string, pairs: ReadonlyArray<readonly [annotation: string, why: string]>, doc: AtscriptDoc): TMessages;
30
+ declare function validateIncompatible(token: Token, tag: string, pairs: ReadonlyArray<readonly [annotation: string, why: string]>, doc?: AtscriptDoc): TMessages;
31
31
  /** Whether a prop is a field of a view interface (`@db.view` / `@db.view.for`). */
32
32
  declare function isViewField(field: SemanticNode): boolean;
33
33
  /** Primitive base type (`string`, `number`, `decimal`, …) of a resolved definition, if it is a primitive. */
package/dist/shared.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as ENCRYPTED_SEARCH_FEATURES, t as ENCRYPTED_INCOMPATIBLE } from "./search-fields-0U0FAFGj.mjs";
1
+ import { n as ENCRYPTED_SEARCH_FEATURES, t as ENCRYPTED_INCOMPATIBLE } from "./search-fields-BPNsxrCk.mjs";
2
2
  import { s as stableJson } from "./object-PQ1J8jri.mjs";
3
3
  import { n as isStrictAggregateStruct, t as NOT_DIMENSION_REASON } from "./aggregate-rules-jdPrxqWa.mjs";
4
- import { A as getParentTypeName, B as validateSiblingStringField, C as viewJoins, D as getDbTableOwner, E as getAnnotationAlias, F as refActionAnnotation, I as searchFieldVerdict, L as validateExclusiveWith, M as isNullableUnion, N as isViewField, O as getNavTargetTypeName, P as primitiveBaseType, R as validateFieldBaseType, S as validateRefArgument, T as effectiveAnnotationNames, _ as hasAnyViewAnnotation, a as findStoredField, b as joinTargets, c as refuseCiphertext, d as viewFieldSeals, g as forEachFieldRef, h as findViewCycle, i as encryptedTypeSearchProblem, j as integerMemberIndexProblem, k as getParentStruct, m as findFKFieldsPointingTo, n as encryptedAncestorName, o as isNavProp, p as earlierJoinTargets, r as encryptedSearchProblem, t as NAV_ANNOTATIONS, v as isAliasDecl, w as viewScopeTypes, x as validateQueryScope, y as isDbSourceDecl, z as validateIncompatible } from "./view-validation-QbqqXEAM.mjs";
4
+ import { A as getParentTypeName, B as validateSiblingStringField, C as viewJoins, D as getDbTableOwner, E as getAnnotationAlias, F as refActionAnnotation, I as searchFieldVerdict, L as validateExclusiveWith, M as isNullableUnion, N as isViewField, O as getNavTargetTypeName, P as primitiveBaseType, R as validateFieldBaseType, S as validateRefArgument, T as effectiveAnnotationNames, _ as hasAnyViewAnnotation, a as findStoredField, b as joinTargets, c as refuseCiphertext, d as viewFieldSeals, g as forEachFieldRef, h as findViewCycle, i as encryptedTypeSearchProblem, j as integerMemberIndexProblem, k as getParentStruct, m as findFKFieldsPointingTo, n as encryptedAncestorName, o as isNavProp, p as earlierJoinTargets, r as encryptedSearchProblem, t as NAV_ANNOTATIONS, v as isAliasDecl, w as viewScopeTypes, x as validateQueryScope, y as isDbSourceDecl, z as validateIncompatible } from "./view-validation-BcgDq7M9.mjs";
5
5
  export { ENCRYPTED_INCOMPATIBLE, ENCRYPTED_SEARCH_FEATURES, NAV_ANNOTATIONS, NOT_DIMENSION_REASON, earlierJoinTargets, effectiveAnnotationNames, encryptedAncestorName, encryptedSearchProblem, encryptedTypeSearchProblem, findFKFieldsPointingTo, findStoredField, findViewCycle, forEachFieldRef, getAnnotationAlias, getDbTableOwner, getNavTargetTypeName, getParentStruct, getParentTypeName, hasAnyViewAnnotation, integerMemberIndexProblem, isAliasDecl, isDbSourceDecl, isNavProp, isNullableUnion, isStrictAggregateStruct, isViewField, joinTargets, primitiveBaseType, refActionAnnotation, refuseCiphertext, searchFieldVerdict, stableJson, validateExclusiveWith, validateFieldBaseType, validateIncompatible, validateQueryScope, validateRefArgument, validateSiblingStringField, viewFieldSeals, viewJoins, viewScopeTypes };
package/dist/sync.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_db_error = require("./db-error-DmF1_xrz.cjs");
3
- const require_column_diff = require("./column-diff-CZsMGQ_w.cjs");
3
+ const require_column_diff = require("./column-diff-BIGX3sRH.cjs");
4
4
  const require_validator = require("./validator-DK9Ijpo7.cjs");
5
5
  //#region src/schema/json-column-copy.ts
6
6
  const NONE = {
package/dist/sync.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { Ct as TEnsureTableOptions, Et as TExistingTableOption, G as TDbFieldMeta, Pt as TIndexChange, Tt as TExistingForeignKey, Vt as TReferencingForeignKey, at as TDbObjectKind, cr as TGenericLogger, gn as DbSpace, qt as TTableOptionDiff, xt as TDerivedChangeReason, zt as TPrimaryKeyChange } from "./buckets-_iZV39Z3.cjs";
2
- import { S as snapshotToExistingTableOptions, _ as computeSchemaHash, a as hasForeignKeyChanges, b as computeViewSnapshot, d as TForeignKeySnapshot, f as TTableSnapshot, g as canonicalizeQueryNode, h as TViewSnapshot, i as fkKey, l as sameDefaultValue, m as TViewJoinSnapshot, n as computeForeignKeyDiff, o as TColumnDiffOptions, p as TViewColumnSnapshot, s as computeColumnDiff, t as TForeignKeyDiff, u as TFieldSnapshot, v as computeTableHash, x as snapshotToExistingColumns, y as computeTableSnapshot } from "./fk-diff-B5jW68T3.cjs";
1
+ import { Ct as TEnsureTableOptions, Et as TExistingTableOption, G as TDbFieldMeta, Pt as TIndexChange, Tt as TExistingForeignKey, Vt as TReferencingForeignKey, at as TDbObjectKind, cr as TGenericLogger, gn as DbSpace, qt as TTableOptionDiff, xt as TDerivedChangeReason, zt as TPrimaryKeyChange } from "./buckets-B8UOod-v.cjs";
2
+ import { S as snapshotToExistingTableOptions, _ as computeSchemaHash, a as hasForeignKeyChanges, b as computeViewSnapshot, d as TForeignKeySnapshot, f as TTableSnapshot, g as canonicalizeQueryNode, h as TViewSnapshot, i as fkKey, l as sameDefaultValue, m as TViewJoinSnapshot, n as computeForeignKeyDiff, o as TColumnDiffOptions, p as TViewColumnSnapshot, s as computeColumnDiff, t as TForeignKeyDiff, u as TFieldSnapshot, v as computeTableHash, x as snapshotToExistingColumns, y as computeTableSnapshot } from "./fk-diff-BNGawZi9.cjs";
3
3
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
4
4
 
5
5
  //#region src/schema/sync-entry.d.ts
package/dist/sync.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Ct as TEnsureTableOptions, Et as TExistingTableOption, G as TDbFieldMeta, Pt as TIndexChange, Tt as TExistingForeignKey, Vt as TReferencingForeignKey, at as TDbObjectKind, cr as TGenericLogger, gn as DbSpace, qt as TTableOptionDiff, xt as TDerivedChangeReason, zt as TPrimaryKeyChange } from "./buckets-DUTcrT4Z.mjs";
2
- import { S as snapshotToExistingTableOptions, _ as computeSchemaHash, a as hasForeignKeyChanges, b as computeViewSnapshot, d as TForeignKeySnapshot, f as TTableSnapshot, g as canonicalizeQueryNode, h as TViewSnapshot, i as fkKey, l as sameDefaultValue, m as TViewJoinSnapshot, n as computeForeignKeyDiff, o as TColumnDiffOptions, p as TViewColumnSnapshot, s as computeColumnDiff, t as TForeignKeyDiff, u as TFieldSnapshot, v as computeTableHash, x as snapshotToExistingColumns, y as computeTableSnapshot } from "./fk-diff-PhVBYohc.mjs";
1
+ import { Ct as TEnsureTableOptions, Et as TExistingTableOption, G as TDbFieldMeta, Pt as TIndexChange, Tt as TExistingForeignKey, Vt as TReferencingForeignKey, at as TDbObjectKind, cr as TGenericLogger, gn as DbSpace, qt as TTableOptionDiff, xt as TDerivedChangeReason, zt as TPrimaryKeyChange } from "./buckets-CHyspjYP.mjs";
2
+ import { S as snapshotToExistingTableOptions, _ as computeSchemaHash, a as hasForeignKeyChanges, b as computeViewSnapshot, d as TForeignKeySnapshot, f as TTableSnapshot, g as canonicalizeQueryNode, h as TViewSnapshot, i as fkKey, l as sameDefaultValue, m as TViewJoinSnapshot, n as computeForeignKeyDiff, o as TColumnDiffOptions, p as TViewColumnSnapshot, s as computeColumnDiff, t as TForeignKeyDiff, u as TFieldSnapshot, v as computeTableHash, x as snapshotToExistingColumns, y as computeTableSnapshot } from "./fk-diff-rj9N2QLw.mjs";
3
3
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
4
4
 
5
5
  //#region src/schema/sync-entry.d.ts
package/dist/sync.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as DbError } from "./db-error-hraC12B9.mjs";
2
- import { A as hasForeignKeyChanges, D as computeForeignKeyDiff, O as fkColumns, P as resolveDesignType, St as NoopLogger, a as computeSchemaHash, c as computeViewSnapshot, d as snapshotToExistingTableOptions, f as viewSnapshotSources, gt as aliasTargetOf, ht as relationalColumnName, i as canonicalizeQueryNode, k as fkKey, l as serializeDefaultValue, o as computeTableHash, r as sameDefaultValue, s as computeTableSnapshot, t as computeColumnDiff, u as snapshotToExistingColumns } from "./column-diff-pdn53AIj.mjs";
2
+ import { A as hasForeignKeyChanges, D as computeForeignKeyDiff, O as fkColumns, P as resolveDesignType, St as NoopLogger, a as computeSchemaHash, c as computeViewSnapshot, d as snapshotToExistingTableOptions, f as viewSnapshotSources, gt as aliasTargetOf, ht as relationalColumnName, i as canonicalizeQueryNode, k as fkKey, l as serializeDefaultValue, o as computeTableHash, r as sameDefaultValue, s as computeTableSnapshot, t as computeColumnDiff, u as snapshotToExistingColumns } from "./column-diff-BfNIlMwX.mjs";
3
3
  import { f as unionValueMembers } from "./validator-DuDWsIdQ.mjs";
4
4
  //#region src/schema/json-column-copy.ts
5
5
  const NONE = {
@@ -25,6 +25,26 @@ type TDbPatch<T> = { [K in keyof T]?: T[K] extends Array<infer _> ? TArrayPatch<
25
25
  */
26
26
  declare function getKeyProps(def: TAtscriptAnnotatedType<TAtscriptTypeArray>): Set<string>;
27
27
  //#endregion
28
+ //#region src/shared/server-stamped.d.ts
29
+ /**
30
+ * The annotations whose field the server writes on every update — the write
31
+ * sets `@db.onUpdate.now` to the current time and increments
32
+ * `@db.onUpdate.inc` — so a client value is overwritten (now) or dropped
33
+ * (inc). Dependency-free: UI and plugin code can import it from
34
+ * `@atscript/db/validator` without pulling the compiler into a bundle.
35
+ * @since 0.1.163
36
+ */
37
+ declare const SERVER_STAMPED_ON_UPDATE_KEYS: ReadonlySet<string>;
38
+ /**
39
+ * Whether a field's metadata marks it as stamped by the server on every
40
+ * update (`@db.onUpdate.now` or `@db.onUpdate.inc`) — e.g. to render it
41
+ * read-only in an edit form.
42
+ * @since 0.1.163
43
+ */
44
+ declare function isServerStampedOnUpdate(metadata: {
45
+ has(key: string): boolean;
46
+ }): boolean;
47
+ //#endregion
28
48
  //#region src/validator.d.ts
29
49
  /** Write operation mode for validator configuration. */
30
50
  type ValidatorMode = "insert" | "patch" | "replace";
@@ -85,4 +105,4 @@ interface ValidationContext {
85
105
  */
86
106
  declare function buildValidationContext(type: TAtscriptAnnotatedType<TAtscriptTypeObject>): ValidationContext;
87
107
  //#endregion
88
- export { buildValidationContext as a, isNavRelation as c, getKeyProps as d, buildPatchPartial as i, TArrayPatch as l, ValidatorMode as n, dbPlugin as o, buildDbValidator as r, forceNavNonOptional as s, ValidationContext as t, TDbPatch as u };
108
+ export { buildValidationContext as a, isNavRelation as c, TArrayPatch as d, TDbPatch as f, buildPatchPartial as i, SERVER_STAMPED_ON_UPDATE_KEYS as l, ValidatorMode as n, dbPlugin as o, getKeyProps as p, buildDbValidator as r, forceNavNonOptional as s, ValidationContext as t, isServerStampedOnUpdate as u };
@@ -25,6 +25,26 @@ type TDbPatch<T> = { [K in keyof T]?: T[K] extends Array<infer _> ? TArrayPatch<
25
25
  */
26
26
  declare function getKeyProps(def: TAtscriptAnnotatedType<TAtscriptTypeArray>): Set<string>;
27
27
  //#endregion
28
+ //#region src/shared/server-stamped.d.ts
29
+ /**
30
+ * The annotations whose field the server writes on every update — the write
31
+ * sets `@db.onUpdate.now` to the current time and increments
32
+ * `@db.onUpdate.inc` — so a client value is overwritten (now) or dropped
33
+ * (inc). Dependency-free: UI and plugin code can import it from
34
+ * `@atscript/db/validator` without pulling the compiler into a bundle.
35
+ * @since 0.1.163
36
+ */
37
+ declare const SERVER_STAMPED_ON_UPDATE_KEYS: ReadonlySet<string>;
38
+ /**
39
+ * Whether a field's metadata marks it as stamped by the server on every
40
+ * update (`@db.onUpdate.now` or `@db.onUpdate.inc`) — e.g. to render it
41
+ * read-only in an edit form.
42
+ * @since 0.1.163
43
+ */
44
+ declare function isServerStampedOnUpdate(metadata: {
45
+ has(key: string): boolean;
46
+ }): boolean;
47
+ //#endregion
28
48
  //#region src/validator.d.ts
29
49
  /** Write operation mode for validator configuration. */
30
50
  type ValidatorMode = "insert" | "patch" | "replace";
@@ -85,4 +105,4 @@ interface ValidationContext {
85
105
  */
86
106
  declare function buildValidationContext(type: TAtscriptAnnotatedType<TAtscriptTypeObject>): ValidationContext;
87
107
  //#endregion
88
- export { buildValidationContext as a, isNavRelation as c, getKeyProps as d, buildPatchPartial as i, TArrayPatch as l, ValidatorMode as n, dbPlugin as o, buildDbValidator as r, forceNavNonOptional as s, ValidationContext as t, TDbPatch as u };
108
+ export { buildValidationContext as a, isNavRelation as c, TArrayPatch as d, TDbPatch as f, buildPatchPartial as i, SERVER_STAMPED_ON_UPDATE_KEYS as l, ValidatorMode as n, dbPlugin as o, getKeyProps as p, buildDbValidator as r, forceNavNonOptional as s, ValidationContext as t, isServerStampedOnUpdate as u };
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_db_error = require("./db-error-DmF1_xrz.cjs");
3
3
  const require_validator = require("./validator-DK9Ijpo7.cjs");
4
+ const require_server_stamped = require("./server-stamped-B6XbUQ4p.cjs");
4
5
  const require_object = require("./object-GjsuPNqo.cjs");
5
6
  const require_ops = require("./ops.cjs");
6
7
  exports.$cas = require_ops.$cas;
@@ -13,6 +14,7 @@ exports.$replace = require_ops.$replace;
13
14
  exports.$update = require_ops.$update;
14
15
  exports.$upsert = require_ops.$upsert;
15
16
  exports.DbError = require_db_error.DbError;
17
+ exports.SERVER_STAMPED_ON_UPDATE_KEYS = require_server_stamped.SERVER_STAMPED_ON_UPDATE_KEYS;
16
18
  exports.buildDbValidator = require_validator.buildDbValidator;
17
19
  exports.buildPatchPartial = require_validator.buildPatchPartial;
18
20
  exports.buildValidationContext = require_validator.buildValidationContext;
@@ -24,5 +26,6 @@ exports.isDbFieldOp = require_ops.isDbFieldOp;
24
26
  exports.isEmptyObject = require_object.isEmptyObject;
25
27
  exports.isNavRelation = require_validator.isNavRelation;
26
28
  exports.isPlainObject = require_object.isPlainObject;
29
+ exports.isServerStampedOnUpdate = require_server_stamped.isServerStampedOnUpdate;
27
30
  exports.reconcileCas = require_ops.reconcileCas;
28
31
  exports.separateCas = require_ops.separateCas;
@@ -2,5 +2,5 @@ import { r as DbError } from "./db-error-B_DRL1E9.cjs";
2
2
  import { a as $mul, c as $update, d as TDbFieldOp, g as separateCas, h as reconcileCas, i as $insert, l as $upsert, m as isDbFieldOp, n as $dec, o as $remove, r as $inc, s as $replace, t as $cas, u as TDbCas } from "./ops-AqhV7s9o.cjs";
3
3
  import { a as isPlainObject, i as isEmptyObject } from "./object-Czia_qD4.cjs";
4
4
  import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-wRqMYNBI.cjs";
5
- import { a as buildValidationContext, c as isNavRelation, d as getKeyProps, i as buildPatchPartial, l as TArrayPatch, n as ValidatorMode, o as dbPlugin, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as TDbPatch } from "./validator-BcBtg8yW.cjs";
6
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, DbError, type DbValidationContext, type TArrayPatch, type TDbCas, type TDbFieldOp, type TDbPatch, ValidationContext, ValidatorMode, buildDbValidator, buildPatchPartial, buildValidationContext, createDbValidatorPlugin, dbPlugin, forceNavNonOptional, getKeyProps, isDbFieldOp, isEmptyObject, isNavRelation, isPlainObject, reconcileCas, separateCas };
5
+ import { a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, i as buildPatchPartial, l as SERVER_STAMPED_ON_UPDATE_KEYS, n as ValidatorMode, o as dbPlugin, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isServerStampedOnUpdate } from "./validator-DX97RzC2.cjs";
6
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, DbError, type DbValidationContext, SERVER_STAMPED_ON_UPDATE_KEYS, type TArrayPatch, type TDbCas, type TDbFieldOp, type TDbPatch, ValidationContext, ValidatorMode, buildDbValidator, buildPatchPartial, buildValidationContext, createDbValidatorPlugin, dbPlugin, forceNavNonOptional, getKeyProps, isDbFieldOp, isEmptyObject, isNavRelation, isPlainObject, isServerStampedOnUpdate, reconcileCas, separateCas };
@@ -2,5 +2,5 @@ import { r as DbError } from "./db-error-B_DRL1E9.mjs";
2
2
  import { a as $mul, c as $update, d as TDbFieldOp, g as separateCas, h as reconcileCas, i as $insert, l as $upsert, m as isDbFieldOp, n as $dec, o as $remove, r as $inc, s as $replace, t as $cas, u as TDbCas } from "./ops-AqhV7s9o.mjs";
3
3
  import { a as isPlainObject, i as isEmptyObject } from "./object-Czia_qD4.mjs";
4
4
  import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-wRqMYNBI.mjs";
5
- import { a as buildValidationContext, c as isNavRelation, d as getKeyProps, i as buildPatchPartial, l as TArrayPatch, n as ValidatorMode, o as dbPlugin, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as TDbPatch } from "./validator-BcBtg8yW.mjs";
6
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, DbError, type DbValidationContext, type TArrayPatch, type TDbCas, type TDbFieldOp, type TDbPatch, ValidationContext, ValidatorMode, buildDbValidator, buildPatchPartial, buildValidationContext, createDbValidatorPlugin, dbPlugin, forceNavNonOptional, getKeyProps, isDbFieldOp, isEmptyObject, isNavRelation, isPlainObject, reconcileCas, separateCas };
5
+ import { a as buildValidationContext, c as isNavRelation, d as TArrayPatch, f as TDbPatch, i as buildPatchPartial, l as SERVER_STAMPED_ON_UPDATE_KEYS, n as ValidatorMode, o as dbPlugin, p as getKeyProps, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as isServerStampedOnUpdate } from "./validator-DX97RzC2.mjs";
6
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, DbError, type DbValidationContext, SERVER_STAMPED_ON_UPDATE_KEYS, type TArrayPatch, type TDbCas, type TDbFieldOp, type TDbPatch, ValidationContext, ValidatorMode, buildDbValidator, buildPatchPartial, buildValidationContext, createDbValidatorPlugin, dbPlugin, forceNavNonOptional, getKeyProps, isDbFieldOp, isEmptyObject, isNavRelation, isPlainObject, isServerStampedOnUpdate, reconcileCas, separateCas };
@@ -1,5 +1,6 @@
1
1
  import { r as DbError } from "./db-error-hraC12B9.mjs";
2
2
  import { a as forceNavNonOptional, c as getKeyProps, i as dbPlugin, n as buildPatchPartial, o as isNavRelation, r as buildValidationContext, s as createDbValidatorPlugin, t as buildDbValidator } from "./validator-DuDWsIdQ.mjs";
3
+ import { n as isServerStampedOnUpdate, t as SERVER_STAMPED_ON_UPDATE_KEYS } from "./server-stamped-BoP56K9M.mjs";
3
4
  import { a as isPlainObject, i as isEmptyObject } from "./object-PQ1J8jri.mjs";
4
5
  import { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, isDbFieldOp, reconcileCas, separateCas } from "./ops.mjs";
5
- export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, DbError, buildDbValidator, buildPatchPartial, buildValidationContext, createDbValidatorPlugin, dbPlugin, forceNavNonOptional, getKeyProps, isDbFieldOp, isEmptyObject, isNavRelation, isPlainObject, reconcileCas, separateCas };
6
+ export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, DbError, SERVER_STAMPED_ON_UPDATE_KEYS, buildDbValidator, buildPatchPartial, buildValidationContext, createDbValidatorPlugin, dbPlugin, forceNavNonOptional, getKeyProps, isDbFieldOp, isEmptyObject, isNavRelation, isPlainObject, isServerStampedOnUpdate, reconcileCas, separateCas };
@@ -1,5 +1,5 @@
1
1
  import { i as NULL_WHEN_EMPTY_AGGREGATE_FNS, o as SUPPORTED_AGGREGATE_FNS, t as AGG_ANNOTATIONS } from "./aggregate-fns-DsS9UQVB.mjs";
2
- import { i as searchKindOf, l as JSON_LEAF_TYPES, n as ENCRYPTED_SEARCH_FEATURES, r as SEARCH_PROBLEM, s as DB_ENTITY_ANNOTATIONS } from "./search-fields-0U0FAFGj.mjs";
2
+ import { i as searchKindOf, l as JSON_LEAF_TYPES, n as ENCRYPTED_SEARCH_FEATURES, r as SEARCH_PROBLEM, s as DB_ENTITY_ANNOTATIONS } from "./search-fields-BPNsxrCk.mjs";
3
3
  import { AnnotationSpec, annotationExample, isArray, isInterface, isPrimitive, isProp, isQueryComparison, isQueryLogical, isRef, isStructure } from "@atscript/core";
4
4
  //#region src/shared/annotation-utils.ts
5
5
  /**
@@ -12,7 +12,7 @@ import { AnnotationSpec, annotationExample, isArray, isInterface, isPrimitive, i
12
12
  */
13
13
  function effectiveAnnotationNames(field, doc) {
14
14
  const names = new Set(field.annotations?.map((a) => a.name));
15
- for (const a of doc.evalAnnotationsForNode(field) ?? []) names.add(a.name);
15
+ for (const a of doc?.evalAnnotationsForNode(field) ?? []) names.add(a.name);
16
16
  return names;
17
17
  }
18
18
  /**
@@ -1,5 +1,5 @@
1
1
  const require_aggregate_fns = require("./aggregate-fns-DupYzFD7.cjs");
2
- const require_search_fields = require("./search-fields-Bi1n-pB1.cjs");
2
+ const require_search_fields = require("./search-fields-B49-RCWd.cjs");
3
3
  let _atscript_core = require("@atscript/core");
4
4
  //#region src/shared/annotation-utils.ts
5
5
  /**
@@ -12,7 +12,7 @@ let _atscript_core = require("@atscript/core");
12
12
  */
13
13
  function effectiveAnnotationNames(field, doc) {
14
14
  const names = new Set(field.annotations?.map((a) => a.name));
15
- for (const a of doc.evalAnnotationsForNode(field) ?? []) names.add(a.name);
15
+ for (const a of doc?.evalAnnotationsForNode(field) ?? []) names.add(a.name);
16
16
  return names;
17
17
  }
18
18
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db",
3
- "version": "0.1.162",
3
+ "version": "0.1.163",
4
4
  "description": "Database adapter utilities for atscript.",
5
5
  "keywords": [
6
6
  "atscript",