@atscript/db 0.1.148 → 0.1.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agg.d.cts +1 -1
- package/dist/agg.d.mts +1 -1
- package/dist/{buckets-DJiYlMXc.d.cts → buckets-24Ac4sIS.d.cts} +80 -5
- package/dist/{buckets-CNdTOnei.d.mts → buckets-XOz0Bw5x.d.mts} +80 -5
- package/dist/{column-diff-CUU4GvYg.cjs → column-diff-CKKBVDvx.cjs} +646 -341
- package/dist/{column-diff-Cp6ZoyRE.mjs → column-diff-CKLDWBbo.mjs} +522 -253
- package/dist/{fk-diff-BQ4krij8.d.cts → fk-diff-CCLiJ9sJ.d.cts} +2 -1
- package/dist/{fk-diff-DsaIijVX.d.mts → fk-diff-R8eU7gq-.d.mts} +2 -1
- package/dist/index.cjs +10 -3
- package/dist/index.d.cts +66 -4
- package/dist/index.d.mts +66 -4
- package/dist/index.mjs +3 -3
- package/dist/plugin.cjs +143 -36
- package/dist/plugin.mjs +138 -31
- package/dist/rel.d.cts +2 -2
- package/dist/rel.d.mts +2 -2
- package/dist/{relation-helpers-kX7jjgME.d.cts → relation-helpers-DjVJN2ng.d.cts} +1 -1
- package/dist/{relation-helpers-Ba0v49sn.d.mts → relation-helpers-H7UEVkHs.d.mts} +1 -1
- package/dist/search-fields-DBIZKwyb.mjs +117 -0
- package/dist/search-fields-DwrsJUC1.cjs +158 -0
- package/dist/shared.cjs +3 -1
- package/dist/shared.d.cts +19 -1
- package/dist/shared.d.mts +19 -1
- package/dist/shared.mjs +2 -2
- package/dist/sync.cjs +1 -1
- package/dist/sync.d.cts +2 -2
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +1 -1
- package/dist/{validation-utils-Dq0uZ7ef.mjs → validation-utils-DqZAH6aT.mjs} +44 -2
- package/dist/{validation-utils-Da2GjobR.cjs → validation-utils-debIYpq0.cjs} +56 -2
- package/package.json +6 -6
- package/dist/derived-rules-0sKn4f5C.mjs +0 -44
- package/dist/derived-rules-YstgIxG-.cjs +0 -67
- package/dist/numeric-operand-B1jKH7x5.mjs +0 -21
- package/dist/numeric-operand-DKfiRLYp.cjs +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as TDbDefaultValue, H as TDbFieldMeta, U as TDbForeignKey, _t as TExistingTableOption, bn as AtscriptDbReadable, cn as AtscriptQueryFieldRef, en as AtscriptDbView, ht as TExistingColumn, k as TColumnDiff, ln as AtscriptQueryNode, pt as TDerivedColumn, rt as TDbStorageType } from "./buckets-24Ac4sIS.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/schema/schema-hash.d.ts
|
|
4
4
|
interface TFieldSnapshot {
|
|
@@ -28,6 +28,7 @@ interface TIndexSnapshot {
|
|
|
28
28
|
fields: Array<{
|
|
29
29
|
name: string;
|
|
30
30
|
sort: string;
|
|
31
|
+
integer?: true;
|
|
31
32
|
}>;
|
|
32
33
|
}
|
|
33
34
|
interface TForeignKeySnapshot {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as TDbDefaultValue, H as TDbFieldMeta, U as TDbForeignKey, _t as TExistingTableOption, bn as AtscriptDbReadable, cn as AtscriptQueryFieldRef, en as AtscriptDbView, ht as TExistingColumn, k as TColumnDiff, ln as AtscriptQueryNode, pt as TDerivedColumn, rt as TDbStorageType } from "./buckets-XOz0Bw5x.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/schema/schema-hash.d.ts
|
|
4
4
|
interface TFieldSnapshot {
|
|
@@ -28,6 +28,7 @@ interface TIndexSnapshot {
|
|
|
28
28
|
fields: Array<{
|
|
29
29
|
name: string;
|
|
30
30
|
sort: string;
|
|
31
|
+
integer?: true;
|
|
31
32
|
}>;
|
|
32
33
|
}
|
|
33
34
|
interface TForeignKeySnapshot {
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_db_error = require("./db-error-DRQH4sLY.cjs");
|
|
3
|
-
const require_column_diff = require("./column-diff-
|
|
3
|
+
const require_column_diff = require("./column-diff-CKKBVDvx.cjs");
|
|
4
4
|
const require_aggregate_fns = require("./aggregate-fns-C-UJRobm.cjs");
|
|
5
5
|
const require_nested_writer = require("./nested-writer-BUQvk6QT.cjs");
|
|
6
|
-
const
|
|
6
|
+
const require_search_fields = require("./search-fields-DwrsJUC1.cjs");
|
|
7
7
|
const require_object = require("./object-Djg28csK.cjs");
|
|
8
8
|
const require_consts = require("./consts-BzRfCcH2.cjs");
|
|
9
9
|
const require_ops = require("./ops.cjs");
|
|
@@ -450,7 +450,7 @@ if (typeof Symbol.asyncDispose === "symbol") DbSpace.prototype[Symbol.asyncDispo
|
|
|
450
450
|
*/
|
|
451
451
|
function isDbEntityType(value) {
|
|
452
452
|
if (!(0, _atscript_typescript_utils.isAnnotatedType)(value)) return false;
|
|
453
|
-
return
|
|
453
|
+
return require_search_fields.DB_ENTITY_ANNOTATIONS.some((name) => value.metadata.has(name));
|
|
454
454
|
}
|
|
455
455
|
//#endregion
|
|
456
456
|
exports.$cas = require_ops.$cas;
|
|
@@ -480,6 +480,7 @@ exports.DbSpace = DbSpace;
|
|
|
480
480
|
exports.DocumentFieldMapper = require_column_diff.DocumentFieldMapper;
|
|
481
481
|
exports.ENCRYPTED_REASON = require_column_diff.ENCRYPTED_REASON;
|
|
482
482
|
exports.FieldMappingStrategy = require_column_diff.FieldMappingStrategy;
|
|
483
|
+
exports.INTEGER_REGEX_OP = require_column_diff.INTEGER_REGEX_OP;
|
|
483
484
|
exports.IntegrityStrategy = require_column_diff.IntegrityStrategy;
|
|
484
485
|
exports.NativeIntegrity = require_column_diff.NativeIntegrity;
|
|
485
486
|
exports.NoopLogger = require_column_diff.NoopLogger;
|
|
@@ -520,7 +521,9 @@ exports.containsRelationFilter = require_nested_writer.containsRelationFilter;
|
|
|
520
521
|
exports.createDbValidatorPlugin = require_validator.createDbValidatorPlugin;
|
|
521
522
|
exports.createFailureCollector = require_column_diff.createFailureCollector;
|
|
522
523
|
exports.decomposePatch = require_column_diff.decomposePatch;
|
|
524
|
+
exports.defaultFulltextIndex = require_column_diff.defaultFulltextIndex;
|
|
523
525
|
exports.deletePath = require_object.deletePath;
|
|
526
|
+
exports.describeFulltext = require_column_diff.describeFulltext;
|
|
524
527
|
exports.evaluateExpr = require_nested_writer.evaluateExpr;
|
|
525
528
|
exports.findAncestorInSet = require_object.findAncestorInSet;
|
|
526
529
|
exports.fkColumns = require_column_diff.fkColumns;
|
|
@@ -563,6 +566,7 @@ Object.defineProperty(exports, "isRelationOp", {
|
|
|
563
566
|
}
|
|
564
567
|
});
|
|
565
568
|
exports.isResolvedRelationFilter = require_nested_writer.isResolvedRelationFilter;
|
|
569
|
+
exports.isVersionExemptPatch = require_column_diff.isVersionExemptPatch;
|
|
566
570
|
exports.isViewType = require_column_diff.isViewType;
|
|
567
571
|
exports.jsonValueAncestor = require_column_diff.jsonValueAncestor;
|
|
568
572
|
exports.narrowerFilterOps = require_column_diff.narrowerFilterOps;
|
|
@@ -573,10 +577,13 @@ exports.relationStaticFilter = require_nested_writer.relationStaticFilter;
|
|
|
573
577
|
exports.resolveCalendarBuckets = require_column_diff.resolveCalendarBuckets;
|
|
574
578
|
exports.resolveDesignType = require_column_diff.resolveDesignType;
|
|
575
579
|
exports.searchIndexNotFoundMessage = require_column_diff.searchIndexNotFoundMessage;
|
|
580
|
+
exports.searchMemberKind = require_search_fields.searchMemberKind;
|
|
581
|
+
exports.searchTermInteger = require_column_diff.searchTermInteger;
|
|
576
582
|
exports.selfOrAncestor = require_object.selfOrAncestor;
|
|
577
583
|
exports.separateCas = require_ops.separateCas;
|
|
578
584
|
exports.separateFieldOps = require_ops.separateFieldOps;
|
|
579
585
|
exports.sortFieldNames = require_column_diff.sortFieldNames;
|
|
586
|
+
exports.splitFulltextFields = require_column_diff.splitFulltextFields;
|
|
580
587
|
exports.tableNameOf = require_nested_writer.tableNameOf;
|
|
581
588
|
exports.translateQueryTree = require_nested_writer.translateQueryTree;
|
|
582
589
|
exports.uniqueKeyTuple = require_nested_writer.uniqueKeyTuple;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as TDbReferentialAction, $t as
|
|
1
|
+
import { $ as TDbReferentialAction, $t as TDbSpaceOptions, A as TCrudOp, An as andFilters, At as TRowResolveOptions, B as TDbDefaultValue, Bn as TReadControls, Bt as TypedWithRelation, C as NavPropsOf, Cn as REL_FILTER_MAX_DEPTH, Ct as TIdentification, D as TCascadeResolver, Dn as TRelationFilterJunction, Dt as TPrimaryKeyChange, E as PrimaryKeyOf, En as TRelGuardState, Et as TMetadataOverrides, F as TDbActionProcessor, Fn as relationStaticFilter, Ft as TTouchManyOptions, G as TDbIndexField, Gn as TRowOrderKey, Gt as isGeoIndexableType, H as TDbFieldMeta, Hn as TGenericLogger, Ht as UniqueryControls, I as TDbActionTargetSummary, In as DbEncryption, It as TValueFormatterPair, J as TDbInsertIgnoreSlot, Jt as ALL_VIEW_CAPABILITIES, K as TDbIndexType, Kn as UniquSelect, Kt as isGeoPointType, L as TDbAvailableActions, Ln as TDbEncryptionOptions, Lt as TViewJsonType, M as TDbActionInfo, Mn as forEachResolvedRelation, Mt as TSyncColumnResult, N as TDbActionIntent, Nn as hasRelationOp, Nt as TTableOptionDiff, O as TCascadeTarget, On as TRelationFilterTable, Ot as TReferencingForeignKey, P as TDbActionLevel, Pn as isResolvedRelationFilter, Pt as TTableResolver, Q as TDbObjectKind, Qt as TAdapterFactory, R as TDbCollation, Rn as DocumentFieldMapper, Rt as TWriteOptions, S as FlatOf, Sn as resolveDesignType, St as TIdResolveOptions, T as OwnPropsOf, Tn as ResolvedRelationFilter, Tt as TMetaResponse, U as TDbForeignKey, Un as TExprAggregate, Ut as WithRelation, V as TDbDeleteResult, Vn as NoopLogger, Vt as Uniquery, W as TDbIndex, Wn as TFirstLast, Wt as TableMetadata, X as TDbInsertManyResult, Xt as TViewCapability, Y as TDbInsertManyIgnoreResult, Yt as BaseDbAdapter, Z as TDbInsertResult, Zt as DbSpace, _ as DbPatch, _n as IntegrityStrategy, _t as TExistingTableOption, a as isJsonValueField, an as AtscriptExprNode, at as TDbUpdateResult, b as FieldOpsFor, bn as AtscriptDbReadable, bt as TFkLookupTarget, c as resolveCalendarBuckets, cn as AtscriptQueryFieldRef, ct as TDbWriteCheckContext, d as AggregateFn, dn as TViewJoin, dt as TDeleteOptions, en as AtscriptDbView, et as TDbRelation, f as AggregateQuery, fn as TViewPlan, ft as TDerivedChangeReason, g as DbControls, gn as AtscriptDbTable, gt as TExistingForeignKey, h as AtscriptDbWritable, hn as translateQueryTree, ht as TExistingColumn, i as isBucketableField, in as aliasTargetOf, it as TDbUpdateOptions, j as TCrudPermissions, jn as containsRelationFilter, jt as TSearchIndexInfo, k as TColumnDiff, kn as TRelationStaticFilter, kt as TRelationInfo, l as AggregateControls, ln as AtscriptQueryNode, lt as TDbWriteGuard, mn as isFieldRef, mt as TEnsureTableOptions, n as TComputedSelect, nn as isAtscriptDbView, nt as TDbRemoveGuardContext, o as jsonValueAncestor, on as AtscriptOrderItem, ot as TDbWriteAction, p as AggregateResult, pn as evaluateExpr, pt as TDerivedColumn, q as TDbInsertIgnoreResult, qt as ALL_BUCKET_UNITS, r as TResolvedBucket, rn as isViewType, rt as TDbStorageType, s as normalizeComputedSelect, sn as AtscriptQueryComparison, st as TDbWriteCheck, t as TBucketFieldSource, tn as TViewColumnMapping, tt as TDbRemoveGuard, u as AggregateExpr, un as AtscriptRef, ut as TDbWriteGuardContext, v as DbQuery, vn as NativeIntegrity, vt as TFieldMeta, w as NullableOptional, wn as REL_FILTER_MAX_NODES, wt as TInsertOptions, x as FilterExpr, xn as DbResponse, xt as TIdDescriptor, y as DbRow, yn as TCascadePin, yt as TFkLookupResolver, z as TDbDefaultFn, zn as FieldMappingStrategy, zt as TWriteTableResolver } from "./buckets-24Ac4sIS.cjs";
|
|
2
2
|
import { _ as separateFieldOps, a as $mul, c as $update, d as TDbFieldOp, f as TFieldOps, g as separateCas, h as reconcileCas, i as $insert, l as $upsert, m as isDbFieldOp, n as $dec, o as $remove, p as getDbFieldOp, r as $inc, s as $replace, t as $cas, u as TDbCas } from "./ops-AqhV7s9o.cjs";
|
|
3
3
|
import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, t as deletePath } from "./object-CtPYTIvy.cjs";
|
|
4
4
|
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";
|
|
5
5
|
import { _ as aggregateFailure, a as buildValidationContext, c as isNavRelation, d as getKeyProps, f as CasExhaustedError, g as aggregateExpressionsNotSupported, h as DbErrorCode, l as TArrayPatch, m as DbError, n as ValidatorMode, p as CasMismatchError, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as TDbPatch, v as bucketTimeZoneUnavailable, y as isConflict } from "./validator-tBNvM1qc.cjs";
|
|
6
6
|
import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-BWy60OvG.cjs";
|
|
7
|
-
import { r as fkColumns, s as isColumnTypeChanged } from "./fk-diff-
|
|
8
|
-
import { i as tableNameOf } from "./relation-helpers-
|
|
7
|
+
import { r as fkColumns, s as isColumnTypeChanged } from "./fk-diff-CCLiJ9sJ.cjs";
|
|
8
|
+
import { i as tableNameOf } from "./relation-helpers-DjVJN2ng.cjs";
|
|
9
9
|
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";
|
|
10
10
|
import { AtscriptExprNode as AtscriptExprNode$1, TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
11
11
|
|
|
@@ -516,6 +516,54 @@ declare function vectorIndexNotFoundMessage(indexName?: string): string;
|
|
|
516
516
|
*/
|
|
517
517
|
declare function geoIndexNotFoundMessage(tableName: string, indexName?: string): string;
|
|
518
518
|
//#endregion
|
|
519
|
+
//#region src/shared/search-term.d.ts
|
|
520
|
+
/**
|
|
521
|
+
* Internal filter operator (since 0.1.150): a regular expression over the
|
|
522
|
+
* DECIMAL TEXT of an integer column. The core rewrites a caller's `$regex`
|
|
523
|
+
* (or bare `RegExp`) on an integer field into it at translation time;
|
|
524
|
+
* callers can never send it (the filter value guard refuses it).
|
|
525
|
+
*/
|
|
526
|
+
declare const INTEGER_REGEX_OP = "$integerRegex";
|
|
527
|
+
/**
|
|
528
|
+
* The whole number a `$search` term denotes, or `undefined` (since 0.1.150).
|
|
529
|
+
* The trimmed term must be a plain integer literal — ASCII digits with an
|
|
530
|
+
* optional leading `-`, no `+`, no leading zeros (except `0` itself), no
|
|
531
|
+
* `-0`, no separators / decimals / exponent — within the safe-integer range.
|
|
532
|
+
* Only the whole term counts (`"invoice 2946"` has no number).
|
|
533
|
+
*/
|
|
534
|
+
declare function searchTermInteger(term: string): number | undefined;
|
|
535
|
+
/**
|
|
536
|
+
* Splits a fulltext index into the members that belong to the physical text
|
|
537
|
+
* index and the integer members matched by exact number (since 0.1.150).
|
|
538
|
+
*/
|
|
539
|
+
declare function splitFulltextFields(index: Pick<TDbIndex, "fields">): {
|
|
540
|
+
text: TDbIndexField[];
|
|
541
|
+
integer: TDbIndexField[];
|
|
542
|
+
};
|
|
543
|
+
/**
|
|
544
|
+
* `/meta` description of a fulltext index: the adapter's text-index label over
|
|
545
|
+
* the text members, then the exact-number members (since 0.1.150).
|
|
546
|
+
*/
|
|
547
|
+
declare function describeFulltext(index: Pick<TDbIndex, "fields">, textLabel: (names: string) => string): string;
|
|
548
|
+
/**
|
|
549
|
+
* The fulltext index that answers a search naming none (since 0.1.150): the
|
|
550
|
+
* first one with at least one TEXT member, else the first one (an index of
|
|
551
|
+
* integer members only answers exact-number terms).
|
|
552
|
+
*/
|
|
553
|
+
declare function defaultFulltextIndex<T extends Pick<TDbIndex, "fields">>(indexes: readonly T[]): T | undefined;
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region src/shared/search-fields.d.ts
|
|
556
|
+
/** How a field takes part in `$search`: matched as text, or by whole-number equality / decimal text. */
|
|
557
|
+
type TSearchMemberKind = "text" | "integer";
|
|
558
|
+
/**
|
|
559
|
+
* Runtime mirror of the plugin's verdict: how the annotated type takes part
|
|
560
|
+
* in `$search`. Structures, arrays, unions and unresolved types keep their
|
|
561
|
+
* legacy `"text"` treatment.
|
|
562
|
+
*/
|
|
563
|
+
declare function searchMemberKind(type: TAtscriptAnnotatedType | undefined): TSearchMemberKind | {
|
|
564
|
+
problem: string;
|
|
565
|
+
};
|
|
566
|
+
//#endregion
|
|
519
567
|
//#region src/patch/patch-decomposer.d.ts
|
|
520
568
|
/**
|
|
521
569
|
* Decomposes a patch payload into a flat update object for adapters
|
|
@@ -560,6 +608,20 @@ declare function decomposePatch(payload: Record<string, unknown>, table: Atscrip
|
|
|
560
608
|
*/
|
|
561
609
|
declare function assertNoVersionWrites(data: Record<string, unknown>, versionColumn: string): void;
|
|
562
610
|
//#endregion
|
|
611
|
+
//#region src/patch/version-exempt.d.ts
|
|
612
|
+
/**
|
|
613
|
+
* Whether a logical (pre-decomposition) patch writes ONLY version-exempt
|
|
614
|
+
* fields (`@db.column.version.exempt`). `data` has nav fields, filter keys and
|
|
615
|
+
* derived fields removed and `$cas` separated. Mirrors `flattenPatchPayload`
|
|
616
|
+
* (keep the two side by side): PK keys are skipped; an exempt path (or one
|
|
617
|
+
* under an exempt ancestor) is covered whatever its value (scalar, field op,
|
|
618
|
+
* array ops, object); a non-exempt merge-strategy object recurses (only the
|
|
619
|
+
* supplied children are written); anything else is a non-exempt write.
|
|
620
|
+
* True iff at least one key is covered and none is not.
|
|
621
|
+
* @since 0.1.150
|
|
622
|
+
*/
|
|
623
|
+
declare function isVersionExemptPatch(data: Record<string, unknown>, table: AtscriptDbTable): boolean;
|
|
624
|
+
//#endregion
|
|
563
625
|
//#region src/table/db-entity.d.ts
|
|
564
626
|
/**
|
|
565
627
|
* Whether `value` is a compiled type a `DbSpace` accepts: an annotated type
|
|
@@ -601,4 +663,4 @@ declare function createFailureCollector(what: string): {
|
|
|
601
663
|
*/
|
|
602
664
|
declare function numericOperandProblem(fd: TDbFieldMeta): string | undefined;
|
|
603
665
|
//#endregion
|
|
604
|
-
export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, 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, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, 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 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 TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateResult, type TDbWriteAction, type TDbWriteCheck, type TDbWriteCheckContext, type TDbWriteGuard, type TDbWriteGuardContext, 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 TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TInsertOptions, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadControls, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, 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, createDbValidatorPlugin, createFailureCollector, decomposePatch, deletePath, evaluateExpr, findAncestorInSet, fkColumns, 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, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|
|
666
|
+
export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, 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 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 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 TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, 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 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 TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TInsertOptions, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadControls, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSearchMemberKind, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, 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, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, 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, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as TDbReferentialAction, $t as
|
|
1
|
+
import { $ as TDbReferentialAction, $t as TDbSpaceOptions, A as TCrudOp, An as andFilters, At as TRowResolveOptions, B as TDbDefaultValue, Bn as TReadControls, Bt as TypedWithRelation, C as NavPropsOf, Cn as REL_FILTER_MAX_DEPTH, Ct as TIdentification, D as TCascadeResolver, Dn as TRelationFilterJunction, Dt as TPrimaryKeyChange, E as PrimaryKeyOf, En as TRelGuardState, Et as TMetadataOverrides, F as TDbActionProcessor, Fn as relationStaticFilter, Ft as TTouchManyOptions, G as TDbIndexField, Gn as TRowOrderKey, Gt as isGeoIndexableType, H as TDbFieldMeta, Hn as TGenericLogger, Ht as UniqueryControls, I as TDbActionTargetSummary, In as DbEncryption, It as TValueFormatterPair, J as TDbInsertIgnoreSlot, Jt as ALL_VIEW_CAPABILITIES, K as TDbIndexType, Kn as UniquSelect, Kt as isGeoPointType, L as TDbAvailableActions, Ln as TDbEncryptionOptions, Lt as TViewJsonType, M as TDbActionInfo, Mn as forEachResolvedRelation, Mt as TSyncColumnResult, N as TDbActionIntent, Nn as hasRelationOp, Nt as TTableOptionDiff, O as TCascadeTarget, On as TRelationFilterTable, Ot as TReferencingForeignKey, P as TDbActionLevel, Pn as isResolvedRelationFilter, Pt as TTableResolver, Q as TDbObjectKind, Qt as TAdapterFactory, R as TDbCollation, Rn as DocumentFieldMapper, Rt as TWriteOptions, S as FlatOf, Sn as resolveDesignType, St as TIdResolveOptions, T as OwnPropsOf, Tn as ResolvedRelationFilter, Tt as TMetaResponse, U as TDbForeignKey, Un as TExprAggregate, Ut as WithRelation, V as TDbDeleteResult, Vn as NoopLogger, Vt as Uniquery, W as TDbIndex, Wn as TFirstLast, Wt as TableMetadata, X as TDbInsertManyResult, Xt as TViewCapability, Y as TDbInsertManyIgnoreResult, Yt as BaseDbAdapter, Z as TDbInsertResult, Zt as DbSpace, _ as DbPatch, _n as IntegrityStrategy, _t as TExistingTableOption, a as isJsonValueField, an as AtscriptExprNode, at as TDbUpdateResult, b as FieldOpsFor, bn as AtscriptDbReadable, bt as TFkLookupTarget, c as resolveCalendarBuckets, cn as AtscriptQueryFieldRef, ct as TDbWriteCheckContext, d as AggregateFn, dn as TViewJoin, dt as TDeleteOptions, en as AtscriptDbView, et as TDbRelation, f as AggregateQuery, fn as TViewPlan, ft as TDerivedChangeReason, g as DbControls, gn as AtscriptDbTable, gt as TExistingForeignKey, h as AtscriptDbWritable, hn as translateQueryTree, ht as TExistingColumn, i as isBucketableField, in as aliasTargetOf, it as TDbUpdateOptions, j as TCrudPermissions, jn as containsRelationFilter, jt as TSearchIndexInfo, k as TColumnDiff, kn as TRelationStaticFilter, kt as TRelationInfo, l as AggregateControls, ln as AtscriptQueryNode, lt as TDbWriteGuard, mn as isFieldRef, mt as TEnsureTableOptions, n as TComputedSelect, nn as isAtscriptDbView, nt as TDbRemoveGuardContext, o as jsonValueAncestor, on as AtscriptOrderItem, ot as TDbWriteAction, p as AggregateResult, pn as evaluateExpr, pt as TDerivedColumn, q as TDbInsertIgnoreResult, qt as ALL_BUCKET_UNITS, r as TResolvedBucket, rn as isViewType, rt as TDbStorageType, s as normalizeComputedSelect, sn as AtscriptQueryComparison, st as TDbWriteCheck, t as TBucketFieldSource, tn as TViewColumnMapping, tt as TDbRemoveGuard, u as AggregateExpr, un as AtscriptRef, ut as TDbWriteGuardContext, v as DbQuery, vn as NativeIntegrity, vt as TFieldMeta, w as NullableOptional, wn as REL_FILTER_MAX_NODES, wt as TInsertOptions, x as FilterExpr, xn as DbResponse, xt as TIdDescriptor, y as DbRow, yn as TCascadePin, yt as TFkLookupResolver, z as TDbDefaultFn, zn as FieldMappingStrategy, zt as TWriteTableResolver } from "./buckets-XOz0Bw5x.mjs";
|
|
2
2
|
import { _ as separateFieldOps, a as $mul, c as $update, d as TDbFieldOp, f as TFieldOps, g as separateCas, h as reconcileCas, i as $insert, l as $upsert, m as isDbFieldOp, n as $dec, o as $remove, p as getDbFieldOp, r as $inc, s as $replace, t as $cas, u as TDbCas } from "./ops-AqhV7s9o.mjs";
|
|
3
3
|
import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, t as deletePath } from "./object-CtPYTIvy.mjs";
|
|
4
4
|
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";
|
|
5
5
|
import { _ as aggregateFailure, a as buildValidationContext, c as isNavRelation, d as getKeyProps, f as CasExhaustedError, g as aggregateExpressionsNotSupported, h as DbErrorCode, l as TArrayPatch, m as DbError, n as ValidatorMode, p as CasMismatchError, r as buildDbValidator, s as forceNavNonOptional, t as ValidationContext, u as TDbPatch, v as bucketTimeZoneUnavailable, y as isConflict } from "./validator-tBNvM1qc.mjs";
|
|
6
6
|
import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-BWy60OvG.mjs";
|
|
7
|
-
import { r as fkColumns, s as isColumnTypeChanged } from "./fk-diff-
|
|
8
|
-
import { i as tableNameOf } from "./relation-helpers-
|
|
7
|
+
import { r as fkColumns, s as isColumnTypeChanged } from "./fk-diff-R8eU7gq-.mjs";
|
|
8
|
+
import { i as tableNameOf } from "./relation-helpers-H7UEVkHs.mjs";
|
|
9
9
|
import { AtscriptExprNode as AtscriptExprNode$1, TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
10
10
|
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";
|
|
11
11
|
|
|
@@ -516,6 +516,54 @@ declare function vectorIndexNotFoundMessage(indexName?: string): string;
|
|
|
516
516
|
*/
|
|
517
517
|
declare function geoIndexNotFoundMessage(tableName: string, indexName?: string): string;
|
|
518
518
|
//#endregion
|
|
519
|
+
//#region src/shared/search-term.d.ts
|
|
520
|
+
/**
|
|
521
|
+
* Internal filter operator (since 0.1.150): a regular expression over the
|
|
522
|
+
* DECIMAL TEXT of an integer column. The core rewrites a caller's `$regex`
|
|
523
|
+
* (or bare `RegExp`) on an integer field into it at translation time;
|
|
524
|
+
* callers can never send it (the filter value guard refuses it).
|
|
525
|
+
*/
|
|
526
|
+
declare const INTEGER_REGEX_OP = "$integerRegex";
|
|
527
|
+
/**
|
|
528
|
+
* The whole number a `$search` term denotes, or `undefined` (since 0.1.150).
|
|
529
|
+
* The trimmed term must be a plain integer literal — ASCII digits with an
|
|
530
|
+
* optional leading `-`, no `+`, no leading zeros (except `0` itself), no
|
|
531
|
+
* `-0`, no separators / decimals / exponent — within the safe-integer range.
|
|
532
|
+
* Only the whole term counts (`"invoice 2946"` has no number).
|
|
533
|
+
*/
|
|
534
|
+
declare function searchTermInteger(term: string): number | undefined;
|
|
535
|
+
/**
|
|
536
|
+
* Splits a fulltext index into the members that belong to the physical text
|
|
537
|
+
* index and the integer members matched by exact number (since 0.1.150).
|
|
538
|
+
*/
|
|
539
|
+
declare function splitFulltextFields(index: Pick<TDbIndex, "fields">): {
|
|
540
|
+
text: TDbIndexField[];
|
|
541
|
+
integer: TDbIndexField[];
|
|
542
|
+
};
|
|
543
|
+
/**
|
|
544
|
+
* `/meta` description of a fulltext index: the adapter's text-index label over
|
|
545
|
+
* the text members, then the exact-number members (since 0.1.150).
|
|
546
|
+
*/
|
|
547
|
+
declare function describeFulltext(index: Pick<TDbIndex, "fields">, textLabel: (names: string) => string): string;
|
|
548
|
+
/**
|
|
549
|
+
* The fulltext index that answers a search naming none (since 0.1.150): the
|
|
550
|
+
* first one with at least one TEXT member, else the first one (an index of
|
|
551
|
+
* integer members only answers exact-number terms).
|
|
552
|
+
*/
|
|
553
|
+
declare function defaultFulltextIndex<T extends Pick<TDbIndex, "fields">>(indexes: readonly T[]): T | undefined;
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region src/shared/search-fields.d.ts
|
|
556
|
+
/** How a field takes part in `$search`: matched as text, or by whole-number equality / decimal text. */
|
|
557
|
+
type TSearchMemberKind = "text" | "integer";
|
|
558
|
+
/**
|
|
559
|
+
* Runtime mirror of the plugin's verdict: how the annotated type takes part
|
|
560
|
+
* in `$search`. Structures, arrays, unions and unresolved types keep their
|
|
561
|
+
* legacy `"text"` treatment.
|
|
562
|
+
*/
|
|
563
|
+
declare function searchMemberKind(type: TAtscriptAnnotatedType | undefined): TSearchMemberKind | {
|
|
564
|
+
problem: string;
|
|
565
|
+
};
|
|
566
|
+
//#endregion
|
|
519
567
|
//#region src/patch/patch-decomposer.d.ts
|
|
520
568
|
/**
|
|
521
569
|
* Decomposes a patch payload into a flat update object for adapters
|
|
@@ -560,6 +608,20 @@ declare function decomposePatch(payload: Record<string, unknown>, table: Atscrip
|
|
|
560
608
|
*/
|
|
561
609
|
declare function assertNoVersionWrites(data: Record<string, unknown>, versionColumn: string): void;
|
|
562
610
|
//#endregion
|
|
611
|
+
//#region src/patch/version-exempt.d.ts
|
|
612
|
+
/**
|
|
613
|
+
* Whether a logical (pre-decomposition) patch writes ONLY version-exempt
|
|
614
|
+
* fields (`@db.column.version.exempt`). `data` has nav fields, filter keys and
|
|
615
|
+
* derived fields removed and `$cas` separated. Mirrors `flattenPatchPayload`
|
|
616
|
+
* (keep the two side by side): PK keys are skipped; an exempt path (or one
|
|
617
|
+
* under an exempt ancestor) is covered whatever its value (scalar, field op,
|
|
618
|
+
* array ops, object); a non-exempt merge-strategy object recurses (only the
|
|
619
|
+
* supplied children are written); anything else is a non-exempt write.
|
|
620
|
+
* True iff at least one key is covered and none is not.
|
|
621
|
+
* @since 0.1.150
|
|
622
|
+
*/
|
|
623
|
+
declare function isVersionExemptPatch(data: Record<string, unknown>, table: AtscriptDbTable): boolean;
|
|
624
|
+
//#endregion
|
|
563
625
|
//#region src/table/db-entity.d.ts
|
|
564
626
|
/**
|
|
565
627
|
* Whether `value` is a compiled type a `DbSpace` accepts: an annotated type
|
|
@@ -601,4 +663,4 @@ declare function createFailureCollector(what: string): {
|
|
|
601
663
|
*/
|
|
602
664
|
declare function numericOperandProblem(fd: TDbFieldMeta): string | undefined;
|
|
603
665
|
//#endregion
|
|
604
|
-
export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, 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, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type NullableOptional, 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 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 TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbRemoveGuard, type TDbRemoveGuardContext, type TDbSpaceOptions, type TDbStorageType, type TDbUpdateResult, type TDbWriteAction, type TDbWriteCheck, type TDbWriteCheckContext, type TDbWriteGuard, type TDbWriteGuardContext, 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 TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TInsertOptions, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadControls, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, 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, createDbValidatorPlugin, createFailureCollector, decomposePatch, deletePath, evaluateExpr, findAncestorInSet, fkColumns, 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, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|
|
666
|
+
export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, 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 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 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 TDbDeleteResult, type TDbEncryptionOptions, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertIgnoreResult, type TDbInsertIgnoreSlot, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbObjectKind, type TDbPatch, 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 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 TGenericLogger, type TGroupSourceVerdict, type TGuardedQuery, type TIdDescriptor, type TIdResolveOptions, type TIdentification, type TInsertOptions, type TMetaResponse, type TMetadataOverrides, type TPrimaryKeyChange, type TQueryPathKind, type TQueryPathOp, type TQueryPathRefs, type TQueryPathSource, type TReadControls, type TReferencingForeignKey, type TRelationFilterJunction, type TRelationFilterTable, type TRelationInfo, type TRelationStaticFilter, type TResolvedBucket, type TRowOrderKey, type TRowResolveOptions, type TSearchIndexInfo, type TSearchMemberKind, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TTouchManyOptions, type TValueFormatterPair, type TViewCapability, type TViewColumnMapping, type TViewJoin, type TViewJsonType, type TViewPlan, 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, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, 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, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as aggregateExpressionsNotSupported, c as isConflict, l as spaceClosedError, n as CasMismatchError, o as aggregateFailure, r as DbError, s as bucketTimeZoneUnavailable, t as CasExhaustedError } from "./db-error-Az85UhTX.mjs";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as DocumentFieldMapper, A as resolveDesignType, B as checkHavingKeys, C as ALL_BUCKET_UNITS, D as IntegrityStrategy, E as createFailureCollector, F as ENCRYPTED_REASON, G as guardFilter, H as collectQueryPaths, I as acceptedOperatorsHint, J as guardQuery, K as guardPath, L as assertGeoPoint, M as searchIndexNotFoundMessage, N as vectorIndexNotFoundMessage, O as NativeIntegrity, P as ADAPTER_FILTER_REASON, Q as RelationalFieldMapper, R as bucketSourceVerdict, S as ApplicationIntegrity, T as BaseDbAdapter, U as groupSourceVerdict, V as classifyQueryPath, W as guardAggregate, X as sortFieldNames, Y as narrowerFilterOps, Z as unsupportedOperatorMessage, _ as isViewType, _t as NoopLogger, at as describeFulltext, b as assertNoVersionWrites, ct as TableMetadata, dt as aliasTargetOf, et as FieldMappingStrategy, f as fkColumns, ft as isBucketableField, g as isAtscriptDbView, gt as resolveCalendarBuckets, h as AtscriptDbView, ht as normalizeComputedSelect, it as defaultFulltextIndex, j as geoIndexNotFoundMessage, k as AtscriptDbReadable, lt as isGeoIndexableType, mt as jsonValueAncestor, n as isColumnTypeChanged, nt as numericOperandProblem, ot as searchTermInteger, pt as isJsonValueField, q as guardPaths, rt as INTEGER_REGEX_OP, st as splitFulltextFields, tt as UniquSelect, ut as isGeoPointType, v as AtscriptDbTable, w as ALL_VIEW_CAPABILITIES, x as decomposePatch, y as isVersionExemptPatch, z as canFilterLeaf } from "./column-diff-CKLDWBbo.mjs";
|
|
3
3
|
import { n as ALL_AGGREGATE_FNS } from "./aggregate-fns-CyaZyb9I.mjs";
|
|
4
4
|
import { A as isResolvedRelationFilter, C as REL_FILTER_MAX_NODES, E as containsRelationFilter, G as isFieldRef, K as translateQueryTree, N as relationStaticFilter, O as forEachResolvedRelation, S as REL_FILTER_MAX_DEPTH, T as andFilters, V as tableNameOf, W as evaluateExpr, k as hasRelationOp, w as ResolvedRelationFilter, x as uniqueKeyTuple } from "./nested-writer-CUBoq1ZO.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { i as DB_ENTITY_ANNOTATIONS, n as searchMemberKind } from "./search-fields-DBIZKwyb.mjs";
|
|
6
6
|
import { a as isPlainObject, i as isEmptyObject, n as findAncestorInSet, o as selfOrAncestor, r as getPath, t as deletePath } from "./object-TkiJQ-Dp.mjs";
|
|
7
7
|
import { t as DEFAULT_DB_SPACE } from "./consts-C_-5_pFq.mjs";
|
|
8
8
|
import { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, getDbFieldOp, isDbFieldOp, reconcileCas, separateCas, separateFieldOps } from "./ops.mjs";
|
|
@@ -452,4 +452,4 @@ function isDbEntityType(value) {
|
|
|
452
452
|
return DB_ENTITY_ANNOTATIONS.some((name) => value.metadata.has(name));
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
|
-
export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, ALL_VIEW_CAPABILITIES, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, BaseDbAdapter, CasExhaustedError, CasMismatchError, DEFAULT_DB_SPACE, DbEncryption, DbError, DbSpace, DocumentFieldMapper, ENCRYPTED_REASON, FieldMappingStrategy, 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, createDbValidatorPlugin, createFailureCollector, decomposePatch, deletePath, evaluateExpr, findAncestorInSet, fkColumns, 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, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|
|
455
|
+
export { $cas, $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, ADAPTER_FILTER_REASON, ALL_AGGREGATE_FNS, ALL_BUCKET_UNITS, 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, createDbValidatorPlugin, createFailureCollector, decomposePatch, defaultFulltextIndex, deletePath, describeFulltext, evaluateExpr, findAncestorInSet, fkColumns, 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, isVersionExemptPatch, isViewType, jsonValueAncestor, narrowerFilterOps, normalizeComputedSelect, numericOperandProblem, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, sortFieldNames, splitFulltextFields, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|