@atscript/db 0.1.163 → 0.1.165
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.cjs +1 -1
- package/dist/agg.d.cts +1 -1
- package/dist/agg.d.mts +1 -1
- package/dist/agg.mjs +1 -1
- package/dist/{aggregate-fns-DupYzFD7.cjs → aggregate-fns-CNtrSxGH.cjs} +1 -1
- package/dist/{aggregate-fns-DsS9UQVB.mjs → aggregate-fns-CmtSNIHm.mjs} +1 -1
- package/dist/{buckets-B8UOod-v.d.cts → buckets-BDxKfCNo.d.cts} +143 -13
- package/dist/{buckets-CHyspjYP.d.mts → buckets-CHUgky8T.d.mts} +143 -13
- package/dist/{column-diff-BfNIlMwX.mjs → column-diff-9pF0d8JP.mjs} +354 -31
- package/dist/{column-diff-BIGX3sRH.cjs → column-diff-DjeUj9kb.cjs} +371 -30
- package/dist/control-B5BJypqL.cjs +16 -0
- package/dist/control-CevYIJC4.mjs +16 -0
- package/dist/{db-error-hraC12B9.mjs → db-error-BMy4-OWq.mjs} +23 -1
- package/dist/{db-error-B_DRL1E9.d.cts → db-error-DQUw2cED.d.cts} +65 -9
- package/dist/{db-error-B_DRL1E9.d.mts → db-error-DQUw2cED.d.mts} +65 -9
- package/dist/{db-error-DmF1_xrz.cjs → db-error-G3sgvL87.cjs} +28 -0
- package/dist/{fk-diff-BNGawZi9.d.cts → fk-diff-DSM7O7hs.d.cts} +1 -1
- package/dist/{fk-diff-rj9N2QLw.d.mts → fk-diff-Dapr5Dk-.d.mts} +1 -1
- package/dist/index.cjs +17 -11
- package/dist/index.d.cts +38 -12
- package/dist/index.d.mts +38 -12
- package/dist/index.mjs +14 -12
- package/dist/{nested-writer-ClUX0DB0.mjs → nested-writer-BraWjS8a.mjs} +177 -26
- package/dist/{nested-writer-yCy6wGuN.cjs → nested-writer-DOvdbYG-.cjs} +194 -31
- package/dist/ops.cjs +1 -1
- package/dist/ops.mjs +1 -1
- package/dist/plugin.cjs +15 -12
- package/dist/plugin.mjs +15 -12
- package/dist/rel.cjs +2 -2
- package/dist/rel.d.cts +2 -2
- package/dist/rel.d.mts +2 -2
- package/dist/rel.mjs +2 -2
- package/dist/{relation-helpers-DloMywNs.d.cts → relation-helpers-C4UNWYQu.d.cts} +1 -1
- package/dist/{relation-helpers-zwt19E7r.d.mts → relation-helpers-hdbuqwjV.d.mts} +1 -1
- package/dist/{relation-loader-Qv3LrQ42.mjs → relation-loader-BOEVhcBe.mjs} +1 -1
- package/dist/{relation-loader-DujL_Mh9.cjs → relation-loader-BrkakVF_.cjs} +1 -1
- package/dist/shared.cjs +3 -1
- package/dist/shared.d.cts +13 -2
- package/dist/shared.d.mts +13 -2
- package/dist/shared.mjs +2 -2
- package/dist/sync.cjs +107 -25
- package/dist/sync.d.cts +53 -6
- package/dist/sync.d.mts +53 -6
- package/dist/sync.mjs +107 -25
- package/dist/{validator-DK9Ijpo7.cjs → validator-D7E7T0Oy.cjs} +1 -1
- package/dist/{validator-DuDWsIdQ.mjs → validator-UpgPhwvH.mjs} +1 -1
- package/dist/validator.cjs +2 -2
- package/dist/validator.d.cts +1 -1
- package/dist/validator.d.mts +1 -1
- package/dist/validator.mjs +2 -2
- package/dist/{view-validation-BiDLCYMw.cjs → view-validation-C0UVLx_H.cjs} +38 -10
- package/dist/{view-validation-BcgDq7M9.mjs → view-validation-KW77xIKn.mjs} +28 -12
- package/package.json +6 -6
- package/dist/control-D5cQmzFj.mjs +0 -14
- package/dist/control-jIVU2hkf.cjs +0 -14
|
@@ -50,17 +50,64 @@ type DbErrorCode = "CONFLICT" | "FK_VIOLATION" | "NOT_FOUND" | "CASCADE_CYCLE" |
|
|
|
50
50
|
* `isolationLevels()` lacks it.
|
|
51
51
|
*/
|
|
52
52
|
| "ISOLATION_NOT_SUPPORTED";
|
|
53
|
+
/**
|
|
54
|
+
* Per-entry reasons of a constraint violation (since 0.1.165), stable
|
|
55
|
+
* UPPER_SNAKE keys a client can translate (with {@link TDbErrorEntry.params}):
|
|
56
|
+
* - `UNIQUE` — a unique key (or the primary key) already holds the value;
|
|
57
|
+
* params `{ index, fields }` (`index` is the declared unique-index name, or
|
|
58
|
+
* `"primaryKey"`);
|
|
59
|
+
* - `FK_MISSING` — a foreign key names a row that does not exist; params
|
|
60
|
+
* `{ fields, target }` (+ `ambiguous: true` when the engine could not tell
|
|
61
|
+
* which foreign key failed and every one is listed);
|
|
62
|
+
* - `FK_RESTRICT` — a delete is blocked by referencing rows; params
|
|
63
|
+
* `{ table, referencedBy? }`.
|
|
64
|
+
*/
|
|
65
|
+
type TDbErrorEntryCode = "UNIQUE" | "FK_MISSING" | "FK_RESTRICT";
|
|
66
|
+
/** One entry of {@link DbError.errors}. */
|
|
67
|
+
interface TDbErrorEntry {
|
|
68
|
+
/** Logical field path the entry is about (`""` when it concerns the whole row / table). */
|
|
69
|
+
path: string;
|
|
70
|
+
/** Human-readable English message. */
|
|
71
|
+
message: string;
|
|
72
|
+
/**
|
|
73
|
+
* Machine-readable reason of this entry (since 0.1.165) — see
|
|
74
|
+
* {@link TDbErrorEntryCode}. Absent on entries whose reason is the
|
|
75
|
+
* error's own {@link DbError.code}.
|
|
76
|
+
*/
|
|
77
|
+
code?: TDbErrorEntryCode | (string & {});
|
|
78
|
+
/** The values {@link message} names, for rendering it in another language (since 0.1.165). */
|
|
79
|
+
params?: Record<string, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* The engine's raw text, kept for logs when the message was normalized
|
|
82
|
+
* (since 0.1.165). Never sent to HTTP clients.
|
|
83
|
+
*/
|
|
84
|
+
details?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* What an adapter could tell about a violated constraint (since 0.1.165) —
|
|
88
|
+
* the core resolves it against the table's metadata into logical paths
|
|
89
|
+
* (see {@link constraintViolation}). Physical names throughout.
|
|
90
|
+
*/
|
|
91
|
+
interface TDbConstraintHint {
|
|
92
|
+
/** The violated columns, when the engine names them. */
|
|
93
|
+
columns?: readonly string[];
|
|
94
|
+
/** The violated constraint / index name, when the engine names it. */
|
|
95
|
+
name?: string;
|
|
96
|
+
/** On a blocked delete: the table holding the referencing rows. */
|
|
97
|
+
referencedBy?: string;
|
|
98
|
+
/** The violation is the primary key's. */
|
|
99
|
+
primaryKey?: boolean;
|
|
100
|
+
}
|
|
53
101
|
declare class DbError extends Error {
|
|
54
102
|
readonly code: DbErrorCode;
|
|
55
|
-
readonly errors:
|
|
56
|
-
path: string;
|
|
57
|
-
message: string;
|
|
58
|
-
}>;
|
|
103
|
+
readonly errors: TDbErrorEntry[];
|
|
59
104
|
name: string;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Set by {@link constraintViolation}: what the adapter could tell about the
|
|
107
|
+
* violated constraint, for the table layer to normalize. @internal
|
|
108
|
+
*/
|
|
109
|
+
hint?: TDbConstraintHint;
|
|
110
|
+
constructor(code: DbErrorCode, errors: TDbErrorEntry[], message?: string);
|
|
64
111
|
/**
|
|
65
112
|
* `true` when retrying the whole transaction may succeed — a transient
|
|
66
113
|
* concurrency condition (`DEADLOCK`, `LOCK_TIMEOUT`,
|
|
@@ -77,6 +124,15 @@ declare class DbError extends Error {
|
|
|
77
124
|
declare function isRetryableDbError(error: unknown): error is DbError;
|
|
78
125
|
/** Whether `error` is a `DbError` with code `CONFLICT` (unique / primary-key violation). */
|
|
79
126
|
declare function isConflict(error: unknown): error is DbError;
|
|
127
|
+
/**
|
|
128
|
+
* The error an adapter throws for an engine unique / foreign-key violation
|
|
129
|
+
* (since 0.1.165): `CONFLICT` (unique, primary key, blocked delete) or
|
|
130
|
+
* `FK_VIOLATION`, carrying the engine's `raw` text and whatever `hint` the
|
|
131
|
+
* engine gave. The table layer rewrites it into one entry per logical field
|
|
132
|
+
* of the violated constraint, with `code` / `params` and the raw text in
|
|
133
|
+
* `details`.
|
|
134
|
+
*/
|
|
135
|
+
declare function constraintViolation(code: "CONFLICT" | "FK_VIOLATION", hint: TDbConstraintHint, raw: string): DbError;
|
|
80
136
|
/**
|
|
81
137
|
* Collapses the failures of a multi-step shutdown into one `AggregateError`
|
|
82
138
|
* (message lists every failure).
|
|
@@ -125,4 +181,4 @@ declare function bucketTimeZoneUnavailable(message: string): DbError;
|
|
|
125
181
|
*/
|
|
126
182
|
declare function aggregateExpressionsNotSupported(): DbError;
|
|
127
183
|
//#endregion
|
|
128
|
-
export {
|
|
184
|
+
export { TDbConstraintHint as a, aggregateExpressionsNotSupported as c, constraintViolation as d, isConflict as f, DbErrorCode as i, aggregateFailure as l, CasMismatchError as n, TDbErrorEntry as o, isRetryableDbError as p, DbError as r, TDbErrorEntryCode as s, CasExhaustedError as t, bucketTimeZoneUnavailable as u };
|
|
@@ -50,17 +50,64 @@ type DbErrorCode = "CONFLICT" | "FK_VIOLATION" | "NOT_FOUND" | "CASCADE_CYCLE" |
|
|
|
50
50
|
* `isolationLevels()` lacks it.
|
|
51
51
|
*/
|
|
52
52
|
| "ISOLATION_NOT_SUPPORTED";
|
|
53
|
+
/**
|
|
54
|
+
* Per-entry reasons of a constraint violation (since 0.1.165), stable
|
|
55
|
+
* UPPER_SNAKE keys a client can translate (with {@link TDbErrorEntry.params}):
|
|
56
|
+
* - `UNIQUE` — a unique key (or the primary key) already holds the value;
|
|
57
|
+
* params `{ index, fields }` (`index` is the declared unique-index name, or
|
|
58
|
+
* `"primaryKey"`);
|
|
59
|
+
* - `FK_MISSING` — a foreign key names a row that does not exist; params
|
|
60
|
+
* `{ fields, target }` (+ `ambiguous: true` when the engine could not tell
|
|
61
|
+
* which foreign key failed and every one is listed);
|
|
62
|
+
* - `FK_RESTRICT` — a delete is blocked by referencing rows; params
|
|
63
|
+
* `{ table, referencedBy? }`.
|
|
64
|
+
*/
|
|
65
|
+
type TDbErrorEntryCode = "UNIQUE" | "FK_MISSING" | "FK_RESTRICT";
|
|
66
|
+
/** One entry of {@link DbError.errors}. */
|
|
67
|
+
interface TDbErrorEntry {
|
|
68
|
+
/** Logical field path the entry is about (`""` when it concerns the whole row / table). */
|
|
69
|
+
path: string;
|
|
70
|
+
/** Human-readable English message. */
|
|
71
|
+
message: string;
|
|
72
|
+
/**
|
|
73
|
+
* Machine-readable reason of this entry (since 0.1.165) — see
|
|
74
|
+
* {@link TDbErrorEntryCode}. Absent on entries whose reason is the
|
|
75
|
+
* error's own {@link DbError.code}.
|
|
76
|
+
*/
|
|
77
|
+
code?: TDbErrorEntryCode | (string & {});
|
|
78
|
+
/** The values {@link message} names, for rendering it in another language (since 0.1.165). */
|
|
79
|
+
params?: Record<string, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* The engine's raw text, kept for logs when the message was normalized
|
|
82
|
+
* (since 0.1.165). Never sent to HTTP clients.
|
|
83
|
+
*/
|
|
84
|
+
details?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* What an adapter could tell about a violated constraint (since 0.1.165) —
|
|
88
|
+
* the core resolves it against the table's metadata into logical paths
|
|
89
|
+
* (see {@link constraintViolation}). Physical names throughout.
|
|
90
|
+
*/
|
|
91
|
+
interface TDbConstraintHint {
|
|
92
|
+
/** The violated columns, when the engine names them. */
|
|
93
|
+
columns?: readonly string[];
|
|
94
|
+
/** The violated constraint / index name, when the engine names it. */
|
|
95
|
+
name?: string;
|
|
96
|
+
/** On a blocked delete: the table holding the referencing rows. */
|
|
97
|
+
referencedBy?: string;
|
|
98
|
+
/** The violation is the primary key's. */
|
|
99
|
+
primaryKey?: boolean;
|
|
100
|
+
}
|
|
53
101
|
declare class DbError extends Error {
|
|
54
102
|
readonly code: DbErrorCode;
|
|
55
|
-
readonly errors:
|
|
56
|
-
path: string;
|
|
57
|
-
message: string;
|
|
58
|
-
}>;
|
|
103
|
+
readonly errors: TDbErrorEntry[];
|
|
59
104
|
name: string;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Set by {@link constraintViolation}: what the adapter could tell about the
|
|
107
|
+
* violated constraint, for the table layer to normalize. @internal
|
|
108
|
+
*/
|
|
109
|
+
hint?: TDbConstraintHint;
|
|
110
|
+
constructor(code: DbErrorCode, errors: TDbErrorEntry[], message?: string);
|
|
64
111
|
/**
|
|
65
112
|
* `true` when retrying the whole transaction may succeed — a transient
|
|
66
113
|
* concurrency condition (`DEADLOCK`, `LOCK_TIMEOUT`,
|
|
@@ -77,6 +124,15 @@ declare class DbError extends Error {
|
|
|
77
124
|
declare function isRetryableDbError(error: unknown): error is DbError;
|
|
78
125
|
/** Whether `error` is a `DbError` with code `CONFLICT` (unique / primary-key violation). */
|
|
79
126
|
declare function isConflict(error: unknown): error is DbError;
|
|
127
|
+
/**
|
|
128
|
+
* The error an adapter throws for an engine unique / foreign-key violation
|
|
129
|
+
* (since 0.1.165): `CONFLICT` (unique, primary key, blocked delete) or
|
|
130
|
+
* `FK_VIOLATION`, carrying the engine's `raw` text and whatever `hint` the
|
|
131
|
+
* engine gave. The table layer rewrites it into one entry per logical field
|
|
132
|
+
* of the violated constraint, with `code` / `params` and the raw text in
|
|
133
|
+
* `details`.
|
|
134
|
+
*/
|
|
135
|
+
declare function constraintViolation(code: "CONFLICT" | "FK_VIOLATION", hint: TDbConstraintHint, raw: string): DbError;
|
|
80
136
|
/**
|
|
81
137
|
* Collapses the failures of a multi-step shutdown into one `AggregateError`
|
|
82
138
|
* (message lists every failure).
|
|
@@ -125,4 +181,4 @@ declare function bucketTimeZoneUnavailable(message: string): DbError;
|
|
|
125
181
|
*/
|
|
126
182
|
declare function aggregateExpressionsNotSupported(): DbError;
|
|
127
183
|
//#endregion
|
|
128
|
-
export {
|
|
184
|
+
export { TDbConstraintHint as a, aggregateExpressionsNotSupported as c, constraintViolation as d, isConflict as f, DbErrorCode as i, aggregateFailure as l, CasMismatchError as n, TDbErrorEntry as o, isRetryableDbError as p, DbError as r, TDbErrorEntryCode as s, CasExhaustedError as t, bucketTimeZoneUnavailable as u };
|
|
@@ -9,6 +9,11 @@ var DbError = class extends Error {
|
|
|
9
9
|
code;
|
|
10
10
|
errors;
|
|
11
11
|
name = "DbError";
|
|
12
|
+
/**
|
|
13
|
+
* Set by {@link constraintViolation}: what the adapter could tell about the
|
|
14
|
+
* violated constraint, for the table layer to normalize. @internal
|
|
15
|
+
*/
|
|
16
|
+
hint;
|
|
12
17
|
constructor(code, errors, message) {
|
|
13
18
|
super(message ?? errors[0]?.message ?? "Database error");
|
|
14
19
|
this.code = code;
|
|
@@ -37,6 +42,23 @@ function isRetryableDbError(error) {
|
|
|
37
42
|
function isConflict(error) {
|
|
38
43
|
return error instanceof DbError && error.code === "CONFLICT";
|
|
39
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* The error an adapter throws for an engine unique / foreign-key violation
|
|
47
|
+
* (since 0.1.165): `CONFLICT` (unique, primary key, blocked delete) or
|
|
48
|
+
* `FK_VIOLATION`, carrying the engine's `raw` text and whatever `hint` the
|
|
49
|
+
* engine gave. The table layer rewrites it into one entry per logical field
|
|
50
|
+
* of the violated constraint, with `code` / `params` and the raw text in
|
|
51
|
+
* `details`.
|
|
52
|
+
*/
|
|
53
|
+
function constraintViolation(code, hint, raw) {
|
|
54
|
+
const error = new DbError(code, [{
|
|
55
|
+
path: hint.columns?.[0] ?? "",
|
|
56
|
+
message: raw,
|
|
57
|
+
details: raw
|
|
58
|
+
}]);
|
|
59
|
+
error.hint = hint;
|
|
60
|
+
return error;
|
|
61
|
+
}
|
|
40
62
|
/** @internal An `INVALID_QUERY` error with a single `{ path, message }` entry. */
|
|
41
63
|
function invalidQuery(path, message) {
|
|
42
64
|
return new DbError("INVALID_QUERY", [{
|
|
@@ -187,6 +209,12 @@ Object.defineProperty(exports, "bucketTimeZoneUnavailable", {
|
|
|
187
209
|
return bucketTimeZoneUnavailable;
|
|
188
210
|
}
|
|
189
211
|
});
|
|
212
|
+
Object.defineProperty(exports, "constraintViolation", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function() {
|
|
215
|
+
return constraintViolation;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
190
218
|
Object.defineProperty(exports, "invalidQuery", {
|
|
191
219
|
enumerable: true,
|
|
192
220
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as TDbCollation,
|
|
1
|
+
import { B as TDbCollation, Et as TExistingTableOption, G as TDbFieldMeta, H as TDbDefaultValue, K as TDbForeignKey, Mn as AtscriptQueryNode, Sn as AtscriptDbView, St as TDerivedColumn, V as TDbDefaultFn, Wn as AtscriptDbReadable, dt as TDbStorageType, j as TColumnDiff, jn as AtscriptQueryFieldRef, wt as TExistingColumn } from "./buckets-BDxKfCNo.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,
|
|
1
|
+
import { B as TDbCollation, Et as TExistingTableOption, G as TDbFieldMeta, H as TDbDefaultValue, K as TDbForeignKey, Mn as AtscriptQueryNode, Sn as AtscriptDbView, St as TDerivedColumn, V as TDbDefaultFn, Wn as AtscriptDbReadable, dt as TDbStorageType, j as TColumnDiff, jn as AtscriptQueryFieldRef, wt as TExistingColumn } from "./buckets-CHUgky8T.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/schema/schema-hash.d.ts
|
|
4
4
|
interface TFieldSnapshot {
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const require_aggregate_fns = require("./aggregate-fns-
|
|
5
|
-
const require_nested_writer = require("./nested-writer-
|
|
6
|
-
const require_validator = require("./validator-
|
|
2
|
+
const require_column_diff = require("./column-diff-DjeUj9kb.cjs");
|
|
3
|
+
const require_db_error = require("./db-error-G3sgvL87.cjs");
|
|
4
|
+
const require_aggregate_fns = require("./aggregate-fns-CNtrSxGH.cjs");
|
|
5
|
+
const require_nested_writer = require("./nested-writer-DOvdbYG-.cjs");
|
|
6
|
+
const require_validator = require("./validator-D7E7T0Oy.cjs");
|
|
7
7
|
const require_server_stamped = require("./server-stamped-B6XbUQ4p.cjs");
|
|
8
8
|
const require_search_fields = require("./search-fields-B49-RCWd.cjs");
|
|
9
9
|
const require_object = require("./object-GjsuPNqo.cjs");
|
|
@@ -534,7 +534,7 @@ var DbSpace = class {
|
|
|
534
534
|
return target;
|
|
535
535
|
}
|
|
536
536
|
_scanFkLookupTarget(tableName) {
|
|
537
|
-
for (const table of this._allTables) if (table.tableName === tableName) return
|
|
537
|
+
for (const table of this._allTables) if (table.tableName === tableName) return require_column_diff.fkLookupTargetOf(table);
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
if (typeof Symbol.asyncDispose === "symbol") DbSpace.prototype[Symbol.asyncDispose] = function() {
|
|
@@ -545,12 +545,14 @@ if (typeof Symbol.asyncDispose === "symbol") DbSpace.prototype[Symbol.asyncDispo
|
|
|
545
545
|
/**
|
|
546
546
|
* Whether `value` is a compiled type a `DbSpace` accepts: an annotated type
|
|
547
547
|
* whose own declaration carries `@db.table`, `@db.view` or `@db.view.for`.
|
|
548
|
-
* A `@db.alias` type is not one, and neither is a
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
548
|
+
* A `@db.alias` type is not one, and neither is a field typed with a table
|
|
549
|
+
* (`customer: Customer`) — since 0.1.141 the entity annotations stay on the
|
|
550
|
+
* declaring interface instead of travelling with every reference. A plain
|
|
551
|
+
* `export type X = Table` is `Table` itself (@atscript/typescript 0.2), so it
|
|
552
|
+
* passes.
|
|
552
553
|
*
|
|
553
|
-
* Filters a module namespace before a sync
|
|
554
|
+
* Filters a module namespace before a sync (a type listed under two export
|
|
555
|
+
* names is synced once):
|
|
554
556
|
* `syncSchema(db, Object.values(models).filter(isDbEntityType))`.
|
|
555
557
|
* @since 0.1.141
|
|
556
558
|
*/
|
|
@@ -625,6 +627,7 @@ Object.defineProperty(exports, "computeInsights", {
|
|
|
625
627
|
return _uniqu_core.computeInsights;
|
|
626
628
|
}
|
|
627
629
|
});
|
|
630
|
+
exports.constraintViolation = require_db_error.constraintViolation;
|
|
628
631
|
exports.containsRelationFilter = require_nested_writer.containsRelationFilter;
|
|
629
632
|
exports.createChangeRecorder = require_column_diff.createChangeRecorder;
|
|
630
633
|
exports.createDbValidatorPlugin = require_validator.createDbValidatorPlugin;
|
|
@@ -682,6 +685,7 @@ exports.isVersionExemptPatch = require_column_diff.isVersionExemptPatch;
|
|
|
682
685
|
exports.isViewType = require_column_diff.isViewType;
|
|
683
686
|
exports.jsonValueAncestor = require_column_diff.jsonValueAncestor;
|
|
684
687
|
exports.narrowerFilterOps = require_column_diff.narrowerFilterOps;
|
|
688
|
+
exports.nestDottedWith = require_column_diff.nestDottedWith;
|
|
685
689
|
exports.normalizeComputedSelect = require_column_diff.normalizeComputedSelect;
|
|
686
690
|
exports.numericOperandProblem = require_column_diff.numericOperandProblem;
|
|
687
691
|
exports.queryReadColumns = queryReadColumns;
|
|
@@ -689,12 +693,14 @@ exports.reconcileCas = require_ops.reconcileCas;
|
|
|
689
693
|
exports.relationStaticFilter = require_nested_writer.relationStaticFilter;
|
|
690
694
|
exports.resolveCalendarBuckets = require_column_diff.resolveCalendarBuckets;
|
|
691
695
|
exports.resolveDesignType = require_column_diff.resolveDesignType;
|
|
696
|
+
exports.resolveFulltextIndex = require_column_diff.resolveFulltextIndex;
|
|
692
697
|
exports.searchIndexNotFoundMessage = require_column_diff.searchIndexNotFoundMessage;
|
|
693
698
|
exports.searchMemberKind = require_search_fields.searchMemberKind;
|
|
694
699
|
exports.searchTermInteger = require_column_diff.searchTermInteger;
|
|
695
700
|
exports.selfOrAncestor = require_object.selfOrAncestor;
|
|
696
701
|
exports.separateCas = require_ops.separateCas;
|
|
697
702
|
exports.separateFieldOps = require_ops.separateFieldOps;
|
|
703
|
+
exports.soleUnionMember = require_validator.soleUnionMember;
|
|
698
704
|
exports.sortFieldNames = require_column_diff.sortFieldNames;
|
|
699
705
|
exports.splitFulltextFields = require_column_diff.splitFulltextFields;
|
|
700
706
|
exports.stableJson = require_object.stableJson;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { $ as TDbInsertManyIgnoreResult, $n as
|
|
2
|
-
import { a as
|
|
1
|
+
import { $ as TDbInsertManyIgnoreResult, $n as TRelationStaticFilter, $t as TValueFormatterPair, A as TCascadeTarget, An as AtscriptQueryComparison, At as TForeignKeyChange, B as TDbCollation, Bn as MutationFilter, Bt as TPrimaryKeyChange, C as NavPropsOf, Cn as TViewColumnMapping, Ct as TEnsureTableOptions, D as PrimaryKeyOf, Dn as aliasTargetOf, Dt as TFieldMeta, E as OwnPropsOf, En as TViewReadPlan, Et as TExistingTableOption, F as TDbActionIntent, Fn as TViewPlan, Ft as TInsertOneOptions, G as TDbFieldMeta, Gn as DbResponse, Gt as TSearchIndexInfo, H as TDbDefaultValue, Hn as NativeIntegrity, Ht as TReferencingForeignKey, I as TDbActionLevel, In as evaluateExpr, It as TInsertOptions, J as TDbIndexField, Jn as REL_FILTER_MAX_NODES, Jt as TTableOptionDiff, K as TDbForeignKey, Kn as resolveDesignType, Kt as TSyncColumnResult, L as TDbActionProcessor, Ln as isFieldRef, Lt as TJsonCopyTarget, M as TCrudOp, Mn as AtscriptQueryNode, Mt as TIdResolveOptions, N as TCrudPermissions, Nn as AtscriptRef, Nt as TIdentification, O as TBulkWriteOptions, On as AtscriptExprNode, Ot as TFkLookupResolver, P as TDbActionInfo, Pn as TViewJoin, Pt as TIndexChange, Q as TDbInsertIgnoreSlot, Qn as TRelationFilterTable, Qt as TValidateRowsError, R as TDbActionTargetSummary, Rn as translateQueryTree, Rt as TMetaResponse, S as FlatOf, Sn as AtscriptDbView, St as TDerivedColumn, T as NullsPlacement, Tn as isViewType, Tt as TExistingForeignKey, U as TDbDeleteManyOptions, Un as TCascadePin, Ut as TRelationInfo, V as TDbDefaultFn, Vn as IntegrityStrategy, Vt as TReadLockOptions, W as TDbDeleteResult, Wn as AtscriptDbReadable, Wt as TRowResolveOptions, X as TDbInsertIgnoreOptions, Xn as TRelGuardState, Xt as TTouchManyOptions, Y as TDbIndexType, Yn as ResolvedRelationFilter, Yt as TTableResolver, Z as TDbInsertIgnoreResult, Zn as TRelationFilterJunction, Zt as TTransactionOptions, _ as DbPatch, _n as TIndexDiffOptions, _t as TDbWriteGuard, a as isJsonValueField, an as UniqueryControls, ar as relationStaticFilter, at as TDbObjectKind, b as FieldOpsFor, bn as TAdapterFactory, bt as TDeleteOptions, c as resolveCalendarBuckets, cn as isGeoIndexableType, cr as DocumentFieldMapper, ct as TDbRelation, d as AggregateFn, dn as soleUnionMember, dr as NoopLogger, dt as TDbStorageType, en as TViewJsonType, er as andFilters, et as TDbInsertManyResult, f as AggregateQuery, fn as ALL_BUCKET_UNITS, fr as TGenericLogger, ft as TDbUpdateOptions, g as DbControls, gn as TForeignKeyDiffOptions, gr as UniquSelect, gt as TDbWriteCheckContext, h as AtscriptDbWritable, hn as BaseDbAdapter, hr as TRowOrderKey, ht as TDbWriteCheck, i as isBucketableField, in as Uniquery, ir as isResolvedRelationFilter, it as TDbLockWait, j as TColumnDiff, jn as AtscriptQueryFieldRef, jt as TIdDescriptor, k as TCascadeResolver, kn as AtscriptOrderItem, kt as TFkLookupTarget, l as AggregateControls, ln as isGeoPointType, lr as FieldMappingStrategy, lt as TDbRemoveGuard, mn as ALL_VIEW_CAPABILITIES, mr as TFirstLast, mt as TDbWriteAction, n as TComputedSelect, nn as TWriteTableResolver, nr as forEachResolvedRelation, nt as TDbIsolationLevel, o as jsonValueAncestor, on as WithRelation, or as DbEncryption, ot as TDbReadLock, p as AggregateResult, pn as ALL_ISOLATION_LEVELS, pr as TExprAggregate, pt as TDbUpdateResult, q as TDbIndex, qn as REL_FILTER_MAX_DEPTH, qt as TSyncIndexesOptions, r as TResolvedBucket, rn as TypedWithRelation, rr as hasRelationOp, rt as TDbLockMode, s as normalizeComputedSelect, sn as TableMetadata, sr as TDbEncryptionOptions, st as TDbReferentialAction, t as TBucketFieldSource, tn as TWriteOptions, tr as containsRelationFilter, tt as TDbInsertResult, u as AggregateExpr, un as TPathPresence, ur as TReadControls, ut as TDbRemoveGuardContext, v as DbQuery, vn as TViewCapability, vt as TDbWriteGuardContext, w as NullableOptional, wn as isAtscriptDbView, wt as TExistingColumn, x as FilterExpr, xn as TDbSpaceOptions, xt as TDerivedChangeReason, y as DbRow, yn as DbSpace, yt as TDbWriteLimit, z as TDbAvailableActions, zn as AtscriptDbTable, zt as TMetadataOverrides } from "./buckets-BDxKfCNo.cjs";
|
|
2
|
+
import { a as TDbConstraintHint, c as aggregateExpressionsNotSupported, d as constraintViolation, f as isConflict, i as DbErrorCode, l as aggregateFailure, n as CasMismatchError, o as TDbErrorEntry, p as isRetryableDbError, r as DbError, s as TDbErrorEntryCode, t as CasExhaustedError, u as bucketTimeZoneUnavailable } from "./db-error-DQUw2cED.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
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-
|
|
10
|
-
import { i as tableNameOf } from "./relation-helpers-
|
|
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";
|
|
9
|
+
import { c as isColumnTypeChanged, i as fkKey, r as fkColumns } from "./fk-diff-DSM7O7hs.cjs";
|
|
10
|
+
import { i as tableNameOf } from "./relation-helpers-C4UNWYQu.cjs";
|
|
11
|
+
import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, RELATION_OPS, RelationOp, RelationOp as RelationOp$1, ResolvedRowOrderKey, ResolvedSelectExpr, Uniquery as Uniquery$1, WithRelation as WithRelation$1, computeInsights, isPrimitive, isRelationOp, walkFilter } from "@uniqu/core";
|
|
12
12
|
import { AtscriptExprNode as AtscriptExprNode$1, TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
13
13
|
|
|
14
14
|
//#region src/shared/consts.d.ts
|
|
@@ -558,6 +558,30 @@ declare function describeFulltext(index: Pick<TDbIndex, "fields">, textLabel: (n
|
|
|
558
558
|
* integer members only answers exact-number terms).
|
|
559
559
|
*/
|
|
560
560
|
declare function defaultFulltextIndex<T extends Pick<TDbIndex, "fields">>(indexes: readonly T[]): T | undefined;
|
|
561
|
+
/**
|
|
562
|
+
* The fulltext index a search names (since 0.1.165): the one DECLARED with
|
|
563
|
+
* that name (`@db.index.fulltext 'name'`), else the one whose internal key
|
|
564
|
+
* (`atscript__fulltext__<name>`) it is — a deprecated alias kept for callers
|
|
565
|
+
* that copied the key from an older `getSearchIndexes()`. `undefined` when
|
|
566
|
+
* none matches; a search naming no index uses {@link defaultFulltextIndex}.
|
|
567
|
+
*/
|
|
568
|
+
declare function resolveFulltextIndex<T extends Pick<TDbIndex, "name" | "key">>(indexes: readonly T[], indexName: string): T | undefined;
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/shared/with-nesting.d.ts
|
|
571
|
+
/**
|
|
572
|
+
* Rewrites dotted `$with` names into nesting (since 0.1.165):
|
|
573
|
+
* `{ name: "a.b", filter, controls }` becomes
|
|
574
|
+
* `{ name: "a", controls: { $with: [{ name: "b", filter, controls }] } }`,
|
|
575
|
+
* at every depth. Entries naming the same relation at one level are merged
|
|
576
|
+
* into one — the first one's `filter` / `controls` win, the nested `$with`
|
|
577
|
+
* lists are concatenated — so `$with=a($select=x),a.b` loads `a` once with
|
|
578
|
+
* `b` nested in it. Before, a dotted name was silently skipped.
|
|
579
|
+
*
|
|
580
|
+
* Returns the input array itself when no entry at any level is dotted or a
|
|
581
|
+
* string (the common case allocates nothing). String entries (`"a"`, `"a.b"`
|
|
582
|
+
* — the shorthand the `$with` type admits) are read as `{ name }`.
|
|
583
|
+
*/
|
|
584
|
+
declare function nestDottedWith<T extends WithRelation$1 | string>(withRelations: readonly T[]): T[];
|
|
561
585
|
//#endregion
|
|
562
586
|
//#region src/query/read-columns.d.ts
|
|
563
587
|
/**
|
|
@@ -645,12 +669,14 @@ declare function isVersionExemptPatch(data: Record<string, unknown>, table: Atsc
|
|
|
645
669
|
/**
|
|
646
670
|
* Whether `value` is a compiled type a `DbSpace` accepts: an annotated type
|
|
647
671
|
* whose own declaration carries `@db.table`, `@db.view` or `@db.view.for`.
|
|
648
|
-
* A `@db.alias` type is not one, and neither is a
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
672
|
+
* A `@db.alias` type is not one, and neither is a field typed with a table
|
|
673
|
+
* (`customer: Customer`) — since 0.1.141 the entity annotations stay on the
|
|
674
|
+
* declaring interface instead of travelling with every reference. A plain
|
|
675
|
+
* `export type X = Table` is `Table` itself (@atscript/typescript 0.2), so it
|
|
676
|
+
* passes.
|
|
677
|
+
*
|
|
678
|
+
* Filters a module namespace before a sync (a type listed under two export
|
|
679
|
+
* names is synced once):
|
|
654
680
|
* `syncSchema(db, Object.values(models).filter(isDbEntityType))`.
|
|
655
681
|
* @since 0.1.141
|
|
656
682
|
*/
|
|
@@ -695,4 +721,4 @@ declare function createChangeRecorder<C>(dryRun: boolean, attempt?: (label: stri
|
|
|
695
721
|
*/
|
|
696
722
|
declare function numericOperandProblem(fd: TDbFieldMeta): string | undefined;
|
|
697
723
|
//#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, 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 };
|
|
724
|
+
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, type MutationFilter, 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 TDbConstraintHint, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteManyOptions, type TDbDeleteResult, type TDbEncryptionOptions, type TDbErrorEntry, type TDbErrorEntryCode, 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 TInsertOneOptions, 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 TValidateRowsError, 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, constraintViolation, 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, nestDottedWith, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, resolveFulltextIndex, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, soleUnionMember, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { $ as TDbInsertManyIgnoreResult, $n as
|
|
2
|
-
import { a as
|
|
1
|
+
import { $ as TDbInsertManyIgnoreResult, $n as TRelationStaticFilter, $t as TValueFormatterPair, A as TCascadeTarget, An as AtscriptQueryComparison, At as TForeignKeyChange, B as TDbCollation, Bn as MutationFilter, Bt as TPrimaryKeyChange, C as NavPropsOf, Cn as TViewColumnMapping, Ct as TEnsureTableOptions, D as PrimaryKeyOf, Dn as aliasTargetOf, Dt as TFieldMeta, E as OwnPropsOf, En as TViewReadPlan, Et as TExistingTableOption, F as TDbActionIntent, Fn as TViewPlan, Ft as TInsertOneOptions, G as TDbFieldMeta, Gn as DbResponse, Gt as TSearchIndexInfo, H as TDbDefaultValue, Hn as NativeIntegrity, Ht as TReferencingForeignKey, I as TDbActionLevel, In as evaluateExpr, It as TInsertOptions, J as TDbIndexField, Jn as REL_FILTER_MAX_NODES, Jt as TTableOptionDiff, K as TDbForeignKey, Kn as resolveDesignType, Kt as TSyncColumnResult, L as TDbActionProcessor, Ln as isFieldRef, Lt as TJsonCopyTarget, M as TCrudOp, Mn as AtscriptQueryNode, Mt as TIdResolveOptions, N as TCrudPermissions, Nn as AtscriptRef, Nt as TIdentification, O as TBulkWriteOptions, On as AtscriptExprNode, Ot as TFkLookupResolver, P as TDbActionInfo, Pn as TViewJoin, Pt as TIndexChange, Q as TDbInsertIgnoreSlot, Qn as TRelationFilterTable, Qt as TValidateRowsError, R as TDbActionTargetSummary, Rn as translateQueryTree, Rt as TMetaResponse, S as FlatOf, Sn as AtscriptDbView, St as TDerivedColumn, T as NullsPlacement, Tn as isViewType, Tt as TExistingForeignKey, U as TDbDeleteManyOptions, Un as TCascadePin, Ut as TRelationInfo, V as TDbDefaultFn, Vn as IntegrityStrategy, Vt as TReadLockOptions, W as TDbDeleteResult, Wn as AtscriptDbReadable, Wt as TRowResolveOptions, X as TDbInsertIgnoreOptions, Xn as TRelGuardState, Xt as TTouchManyOptions, Y as TDbIndexType, Yn as ResolvedRelationFilter, Yt as TTableResolver, Z as TDbInsertIgnoreResult, Zn as TRelationFilterJunction, Zt as TTransactionOptions, _ as DbPatch, _n as TIndexDiffOptions, _t as TDbWriteGuard, a as isJsonValueField, an as UniqueryControls, ar as relationStaticFilter, at as TDbObjectKind, b as FieldOpsFor, bn as TAdapterFactory, bt as TDeleteOptions, c as resolveCalendarBuckets, cn as isGeoIndexableType, cr as DocumentFieldMapper, ct as TDbRelation, d as AggregateFn, dn as soleUnionMember, dr as NoopLogger, dt as TDbStorageType, en as TViewJsonType, er as andFilters, et as TDbInsertManyResult, f as AggregateQuery, fn as ALL_BUCKET_UNITS, fr as TGenericLogger, ft as TDbUpdateOptions, g as DbControls, gn as TForeignKeyDiffOptions, gr as UniquSelect, gt as TDbWriteCheckContext, h as AtscriptDbWritable, hn as BaseDbAdapter, hr as TRowOrderKey, ht as TDbWriteCheck, i as isBucketableField, in as Uniquery, ir as isResolvedRelationFilter, it as TDbLockWait, j as TColumnDiff, jn as AtscriptQueryFieldRef, jt as TIdDescriptor, k as TCascadeResolver, kn as AtscriptOrderItem, kt as TFkLookupTarget, l as AggregateControls, ln as isGeoPointType, lr as FieldMappingStrategy, lt as TDbRemoveGuard, mn as ALL_VIEW_CAPABILITIES, mr as TFirstLast, mt as TDbWriteAction, n as TComputedSelect, nn as TWriteTableResolver, nr as forEachResolvedRelation, nt as TDbIsolationLevel, o as jsonValueAncestor, on as WithRelation, or as DbEncryption, ot as TDbReadLock, p as AggregateResult, pn as ALL_ISOLATION_LEVELS, pr as TExprAggregate, pt as TDbUpdateResult, q as TDbIndex, qn as REL_FILTER_MAX_DEPTH, qt as TSyncIndexesOptions, r as TResolvedBucket, rn as TypedWithRelation, rr as hasRelationOp, rt as TDbLockMode, s as normalizeComputedSelect, sn as TableMetadata, sr as TDbEncryptionOptions, st as TDbReferentialAction, t as TBucketFieldSource, tn as TWriteOptions, tr as containsRelationFilter, tt as TDbInsertResult, u as AggregateExpr, un as TPathPresence, ur as TReadControls, ut as TDbRemoveGuardContext, v as DbQuery, vn as TViewCapability, vt as TDbWriteGuardContext, w as NullableOptional, wn as isAtscriptDbView, wt as TExistingColumn, x as FilterExpr, xn as TDbSpaceOptions, xt as TDerivedChangeReason, y as DbRow, yn as DbSpace, yt as TDbWriteLimit, z as TDbAvailableActions, zn as AtscriptDbTable, zt as TMetadataOverrides } from "./buckets-CHUgky8T.mjs";
|
|
2
|
+
import { a as TDbConstraintHint, c as aggregateExpressionsNotSupported, d as constraintViolation, f as isConflict, i as DbErrorCode, l as aggregateFailure, n as CasMismatchError, o as TDbErrorEntry, p as isRetryableDbError, r as DbError, s as TDbErrorEntryCode, t as CasExhaustedError, u as bucketTimeZoneUnavailable } from "./db-error-DQUw2cED.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
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-
|
|
10
|
-
import { i as tableNameOf } from "./relation-helpers-
|
|
9
|
+
import { c as isColumnTypeChanged, i as fkKey, r as fkColumns } from "./fk-diff-Dapr5Dk-.mjs";
|
|
10
|
+
import { i as tableNameOf } from "./relation-helpers-hdbuqwjV.mjs";
|
|
11
11
|
import { AtscriptExprNode as AtscriptExprNode$1, TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
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";
|
|
12
|
+
import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, RELATION_OPS, RelationOp, RelationOp as RelationOp$1, ResolvedRowOrderKey, ResolvedSelectExpr, Uniquery as Uniquery$1, WithRelation as WithRelation$1, computeInsights, isPrimitive, isRelationOp, walkFilter } from "@uniqu/core";
|
|
13
13
|
|
|
14
14
|
//#region src/shared/consts.d.ts
|
|
15
15
|
/**
|
|
@@ -558,6 +558,30 @@ declare function describeFulltext(index: Pick<TDbIndex, "fields">, textLabel: (n
|
|
|
558
558
|
* integer members only answers exact-number terms).
|
|
559
559
|
*/
|
|
560
560
|
declare function defaultFulltextIndex<T extends Pick<TDbIndex, "fields">>(indexes: readonly T[]): T | undefined;
|
|
561
|
+
/**
|
|
562
|
+
* The fulltext index a search names (since 0.1.165): the one DECLARED with
|
|
563
|
+
* that name (`@db.index.fulltext 'name'`), else the one whose internal key
|
|
564
|
+
* (`atscript__fulltext__<name>`) it is — a deprecated alias kept for callers
|
|
565
|
+
* that copied the key from an older `getSearchIndexes()`. `undefined` when
|
|
566
|
+
* none matches; a search naming no index uses {@link defaultFulltextIndex}.
|
|
567
|
+
*/
|
|
568
|
+
declare function resolveFulltextIndex<T extends Pick<TDbIndex, "name" | "key">>(indexes: readonly T[], indexName: string): T | undefined;
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/shared/with-nesting.d.ts
|
|
571
|
+
/**
|
|
572
|
+
* Rewrites dotted `$with` names into nesting (since 0.1.165):
|
|
573
|
+
* `{ name: "a.b", filter, controls }` becomes
|
|
574
|
+
* `{ name: "a", controls: { $with: [{ name: "b", filter, controls }] } }`,
|
|
575
|
+
* at every depth. Entries naming the same relation at one level are merged
|
|
576
|
+
* into one — the first one's `filter` / `controls` win, the nested `$with`
|
|
577
|
+
* lists are concatenated — so `$with=a($select=x),a.b` loads `a` once with
|
|
578
|
+
* `b` nested in it. Before, a dotted name was silently skipped.
|
|
579
|
+
*
|
|
580
|
+
* Returns the input array itself when no entry at any level is dotted or a
|
|
581
|
+
* string (the common case allocates nothing). String entries (`"a"`, `"a.b"`
|
|
582
|
+
* — the shorthand the `$with` type admits) are read as `{ name }`.
|
|
583
|
+
*/
|
|
584
|
+
declare function nestDottedWith<T extends WithRelation$1 | string>(withRelations: readonly T[]): T[];
|
|
561
585
|
//#endregion
|
|
562
586
|
//#region src/query/read-columns.d.ts
|
|
563
587
|
/**
|
|
@@ -645,12 +669,14 @@ declare function isVersionExemptPatch(data: Record<string, unknown>, table: Atsc
|
|
|
645
669
|
/**
|
|
646
670
|
* Whether `value` is a compiled type a `DbSpace` accepts: an annotated type
|
|
647
671
|
* whose own declaration carries `@db.table`, `@db.view` or `@db.view.for`.
|
|
648
|
-
* A `@db.alias` type is not one, and neither is a
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
672
|
+
* A `@db.alias` type is not one, and neither is a field typed with a table
|
|
673
|
+
* (`customer: Customer`) — since 0.1.141 the entity annotations stay on the
|
|
674
|
+
* declaring interface instead of travelling with every reference. A plain
|
|
675
|
+
* `export type X = Table` is `Table` itself (@atscript/typescript 0.2), so it
|
|
676
|
+
* passes.
|
|
677
|
+
*
|
|
678
|
+
* Filters a module namespace before a sync (a type listed under two export
|
|
679
|
+
* names is synced once):
|
|
654
680
|
* `syncSchema(db, Object.values(models).filter(isDbEntityType))`.
|
|
655
681
|
* @since 0.1.141
|
|
656
682
|
*/
|
|
@@ -695,4 +721,4 @@ declare function createChangeRecorder<C>(dryRun: boolean, attempt?: (label: stri
|
|
|
695
721
|
*/
|
|
696
722
|
declare function numericOperandProblem(fd: TDbFieldMeta): string | undefined;
|
|
697
723
|
//#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, 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 };
|
|
724
|
+
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, type MutationFilter, 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 TDbConstraintHint, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteManyOptions, type TDbDeleteResult, type TDbEncryptionOptions, type TDbErrorEntry, type TDbErrorEntryCode, 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 TInsertOneOptions, 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 TValidateRowsError, 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, constraintViolation, 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, nestDottedWith, normalizeComputedSelect, numericOperandProblem, queryReadColumns, reconcileCas, relationStaticFilter, resolveCalendarBuckets, resolveDesignType, resolveFulltextIndex, searchIndexNotFoundMessage, searchMemberKind, searchTermInteger, selfOrAncestor, separateCas, separateFieldOps, soleUnionMember, sortFieldNames, splitFulltextFields, stableJson, tableNameOf, translateQueryTree, uniqueKeyTuple, unsupportedOperatorMessage, vectorIndexNotFoundMessage, walkFilter, withOptimisticRetry };
|