@routier/core 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +478 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +480 -23
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.cjs +470 -23
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.js +473 -21
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/query/QueryOptionsCollection.d.ts +13 -0
- package/dist/plugins/query/explain.d.ts +82 -0
- package/dist/plugins/query/formatExplanation.d.ts +9 -0
- package/dist/plugins/query/index.d.ts +2 -0
- package/dist/plugins/query/types.d.ts +11 -0
- package/dist/plugins/types.d.ts +43 -1
- package/dist/plugins/wire/types.d.ts +17 -1
- package/dist/utilities/index.cjs +43 -12
- package/dist/utilities/index.cjs.map +1 -1
- package/dist/utilities/index.js +43 -12
- package/dist/utilities/index.js.map +1 -1
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -3685,11 +3685,13 @@ var TrampolinePipeline = __webpack_require__(416);
|
|
|
3685
3685
|
|
|
3686
3686
|
|
|
3687
3687
|
},
|
|
3688
|
-
|
|
3688
|
+
301(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
3689
3689
|
|
|
3690
3690
|
// EXPORTS
|
|
3691
3691
|
__webpack_require__.d(__webpack_exports__, {
|
|
3692
|
+
jO: () => (/* reexport */ TupleTranslator),
|
|
3692
3693
|
Mr: () => (/* reexport */ deserializeBulkPersist),
|
|
3694
|
+
ae: () => (/* reexport */ explainQuery),
|
|
3693
3695
|
bX: () => (/* reexport */ ConcurrencyDbPlugin),
|
|
3694
3696
|
_b: () => (/* reexport */ DEFAULT_SEMI_JOIN_KEY_THRESHOLD),
|
|
3695
3697
|
pt: () => (/* reexport */ types_QueryOrdering),
|
|
@@ -3713,17 +3715,20 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3713
3715
|
JF: () => (/* reexport */ DataTranslator),
|
|
3714
3716
|
HM: () => (/* reexport */ QueryOptionsCollection/* .QueryOptionsCollection */.H),
|
|
3715
3717
|
KB: () => (/* reexport */ createRequestHandler),
|
|
3716
|
-
|
|
3718
|
+
vZ: () => (/* reexport */ formatExplanation),
|
|
3717
3719
|
II: () => (/* reexport */ deserializeQueryOptions),
|
|
3720
|
+
n: () => (/* reexport */ serializeBulkPersist),
|
|
3718
3721
|
as: () => (/* reexport */ loadJoinInnerSide),
|
|
3719
3722
|
lA: () => (/* reexport */ semiJoinFilter),
|
|
3720
3723
|
kX: () => (/* reexport */ BatchingDbPlugin),
|
|
3721
3724
|
DF: () => (/* reexport */ SqlTranslator),
|
|
3725
|
+
gH: () => (/* reexport */ MEMORY_EXECUTION_EXPLANATIONS),
|
|
3722
3726
|
BL: () => (/* reexport */ serializeQueryOptions),
|
|
3727
|
+
Kg: () => (/* reexport */ withExecutedQueries),
|
|
3723
3728
|
xw: () => (/* reexport */ TranslatedArrayValue),
|
|
3724
3729
|
zH: () => (/* reexport */ joinInPlugin),
|
|
3725
3730
|
XK: () => (/* reexport */ Query),
|
|
3726
|
-
|
|
3731
|
+
jE: () => (/* reexport */ EXECUTED_QUERIES_UNSUPPORTED)
|
|
3727
3732
|
});
|
|
3728
3733
|
|
|
3729
3734
|
;// CONCATENATED MODULE: ./src/plugins/translators/TranslatedArrayValue.ts
|
|
@@ -4258,7 +4263,11 @@ class Query {
|
|
|
4258
4263
|
id: `${event.id}-inner`,
|
|
4259
4264
|
source: event.source,
|
|
4260
4265
|
action: "query",
|
|
4261
|
-
reason: "join inner side"
|
|
4266
|
+
reason: "join inner side",
|
|
4267
|
+
explain: event.explain,
|
|
4268
|
+
// The same array the outer read pushes into, so a join reports BOTH reads in execution
|
|
4269
|
+
// order. Built fresh rather than spread, so this has to be carried explicitly.
|
|
4270
|
+
executedQueries: event.executedQueries
|
|
4262
4271
|
};
|
|
4263
4272
|
query(innerEvent, (result)=>{
|
|
4264
4273
|
if (result.ok === Result/* .PluginEventResult.ERROR */.D.ERROR) {
|
|
@@ -4958,6 +4967,386 @@ class SqlTranslator extends DataTranslator {
|
|
|
4958
4967
|
|
|
4959
4968
|
|
|
4960
4969
|
|
|
4970
|
+
;// CONCATENATED MODULE: ./src/plugins/query/explain.ts
|
|
4971
|
+
|
|
4972
|
+
/**
|
|
4973
|
+
* One sentence per reason code, written for someone meeting pushdown for the first time.
|
|
4974
|
+
*
|
|
4975
|
+
* Beside the codes rather than in the formatter, so console output, a failing test and the
|
|
4976
|
+
* docs all say the same thing.
|
|
4977
|
+
*/ const MEMORY_EXECUTION_EXPLANATIONS = {
|
|
4978
|
+
"not-parsable": "A filter could not be parsed into an expression tree, so it and every option after it run in memory.",
|
|
4979
|
+
"unmapped-property": "The property is not stored in the database, so it can only be read after deserialization.",
|
|
4980
|
+
"renamed-property": "The property is stored under a different name, and selectors use the in-memory name, so it can only be read after deserialization.",
|
|
4981
|
+
"map-rename": "A map renames or drops properties, so every option after it refers to names the database does not have.",
|
|
4982
|
+
"after-nearest": "A similarity search orders and limits rows, and the plugin cannot report whether it performed the search, so every option after it runs in memory.",
|
|
4983
|
+
"after-join": "A join produces [outer, inner] tuples rather than entities, and the plugin cannot report how it joined, so every option after it runs in memory.",
|
|
4984
|
+
"cross-plugin-join": "The two sides of this join live on different plugins, so neither can read the other's rows and the join runs in the datastore."
|
|
4985
|
+
};
|
|
4986
|
+
const EXECUTED_QUERIES_UNSUPPORTED = "This plugin did not report what it executed. It may not support explain.";
|
|
4987
|
+
const DATABASE_STEP_DESCRIPTION = "These options are sent to the plugin.";
|
|
4988
|
+
const MEMORY_STEP_DESCRIPTION = "Routier runs these over the rows the database returned, after deserializing them.";
|
|
4989
|
+
const UNNARROWED_READ_DESCRIPTION = "No option could be pushed down, so the plugin reads the whole collection.";
|
|
4990
|
+
/**
|
|
4991
|
+
* The reportable shape of one option's value.
|
|
4992
|
+
*
|
|
4993
|
+
* Serializable facts only, never the live selector functions — an explanation is a document a
|
|
4994
|
+
* caller may log, diff in a test, or send to a server, and a closure survives none of that.
|
|
4995
|
+
*/ const detailOf = (option)=>{
|
|
4996
|
+
if (option.name === "filter") {
|
|
4997
|
+
const value = option.value;
|
|
4998
|
+
if (value.expression == null) {
|
|
4999
|
+
return undefined;
|
|
5000
|
+
}
|
|
5001
|
+
try {
|
|
5002
|
+
return {
|
|
5003
|
+
expression: types/* .Expression.toJson */.r4.toJson(value.expression)
|
|
5004
|
+
};
|
|
5005
|
+
} catch {
|
|
5006
|
+
// `valueToJson` rejects a value no wire can carry. Reporting the rest of the
|
|
5007
|
+
// explanation beats taking the diagnostic down with the query it describes.
|
|
5008
|
+
return {
|
|
5009
|
+
expressionUnavailable: "This filter holds a value that cannot be serialized."
|
|
5010
|
+
};
|
|
5011
|
+
}
|
|
5012
|
+
}
|
|
5013
|
+
if (option.name === "sort") {
|
|
5014
|
+
const value = option.value;
|
|
5015
|
+
return {
|
|
5016
|
+
propertyName: value.propertyName,
|
|
5017
|
+
direction: value.direction
|
|
5018
|
+
};
|
|
5019
|
+
}
|
|
5020
|
+
if (option.name === "skip" || option.name === "take") {
|
|
5021
|
+
return {
|
|
5022
|
+
value: option.value
|
|
5023
|
+
};
|
|
5024
|
+
}
|
|
5025
|
+
if (option.name === "nearest") {
|
|
5026
|
+
const value = option.value;
|
|
5027
|
+
return {
|
|
5028
|
+
propertyName: value.propertyName,
|
|
5029
|
+
dimensions: value.vector.length,
|
|
5030
|
+
count: value.count
|
|
5031
|
+
};
|
|
5032
|
+
}
|
|
5033
|
+
if (option.name === "join") {
|
|
5034
|
+
const value = option.value;
|
|
5035
|
+
return {
|
|
5036
|
+
kind: value.kind,
|
|
5037
|
+
outerKey: value.outerKey.propertyName,
|
|
5038
|
+
innerKey: value.innerKey.propertyName,
|
|
5039
|
+
crossPlugin: value.crossPlugin,
|
|
5040
|
+
innerOptions: explainedOptionsOf(value.innerOptions)
|
|
5041
|
+
};
|
|
5042
|
+
}
|
|
5043
|
+
if (option.name === "map" || option.name === "group") {
|
|
5044
|
+
const value = option.value;
|
|
5045
|
+
return {
|
|
5046
|
+
fields: value.fields.map((x)=>({
|
|
5047
|
+
from: x.sourceName,
|
|
5048
|
+
to: x.destinationName
|
|
5049
|
+
}))
|
|
5050
|
+
};
|
|
5051
|
+
}
|
|
5052
|
+
return undefined;
|
|
5053
|
+
};
|
|
5054
|
+
const explainedOptionOf = (option, index)=>{
|
|
5055
|
+
const detail = detailOf(option);
|
|
5056
|
+
return {
|
|
5057
|
+
index,
|
|
5058
|
+
name: option.name,
|
|
5059
|
+
...detail == null ? {} : {
|
|
5060
|
+
detail
|
|
5061
|
+
}
|
|
5062
|
+
};
|
|
5063
|
+
};
|
|
5064
|
+
const explainedOptionsOf = (options)=>{
|
|
5065
|
+
const explained = [];
|
|
5066
|
+
let index = 0;
|
|
5067
|
+
options.forEach((option)=>explained.push(explainedOptionOf(option, index++)));
|
|
5068
|
+
return explained;
|
|
5069
|
+
};
|
|
5070
|
+
const summarize = (steps)=>{
|
|
5071
|
+
const reasons = [];
|
|
5072
|
+
let database = 0;
|
|
5073
|
+
let memory = 0;
|
|
5074
|
+
for (const step of steps){
|
|
5075
|
+
if (step.executedIn === "database") {
|
|
5076
|
+
database += step.options.length;
|
|
5077
|
+
continue;
|
|
5078
|
+
}
|
|
5079
|
+
memory += step.options.length;
|
|
5080
|
+
if (step.reason != null && reasons.includes(step.reason) === false) {
|
|
5081
|
+
reasons.push(step.reason);
|
|
5082
|
+
}
|
|
5083
|
+
}
|
|
5084
|
+
const counts = `${database} ${database === 1 ? "option ran" : "options ran"} in the database, ${memory} ran in memory.`;
|
|
5085
|
+
const causes = reasons.map((reason)=>MEMORY_EXECUTION_EXPLANATIONS[reason]).join(" ");
|
|
5086
|
+
return {
|
|
5087
|
+
database,
|
|
5088
|
+
memory,
|
|
5089
|
+
reasons,
|
|
5090
|
+
explanation: causes.length === 0 ? counts : `${counts} ${causes}`
|
|
5091
|
+
};
|
|
5092
|
+
};
|
|
5093
|
+
/**
|
|
5094
|
+
* Groups options into consecutive runs that execute in the same place.
|
|
5095
|
+
*
|
|
5096
|
+
* A step boundary is where execution moves, and a reader has to see the statement as step 1 OF
|
|
5097
|
+
* 2 to understand it is not the whole query. Cutting over to memory is a ratchet, so the
|
|
5098
|
+
* database options are always a prefix and there are at most two steps.
|
|
5099
|
+
*
|
|
5100
|
+
* A database step is emitted even when NO option pushed down, because the plugin is dispatched
|
|
5101
|
+
* either way — `createQueryPayload` always builds a database event. Without it, the worst case
|
|
5102
|
+
* the feature exists to expose reports "0 in the database" while the backend reads the whole
|
|
5103
|
+
* table, which is the opposite of the truth.
|
|
5104
|
+
*/ const toExecutionSteps = (options)=>{
|
|
5105
|
+
const steps = [];
|
|
5106
|
+
let index = 0;
|
|
5107
|
+
options.forEach((option)=>{
|
|
5108
|
+
const explained = explainedOptionOf(option, index++);
|
|
5109
|
+
const current = steps[steps.length - 1];
|
|
5110
|
+
if (current != null && current.executedIn === option.target) {
|
|
5111
|
+
current.options.push(explained);
|
|
5112
|
+
return;
|
|
5113
|
+
}
|
|
5114
|
+
steps.push({
|
|
5115
|
+
step: steps.length + 1,
|
|
5116
|
+
of: 0,
|
|
5117
|
+
executedIn: option.target,
|
|
5118
|
+
description: option.target === "database" ? DATABASE_STEP_DESCRIPTION : MEMORY_STEP_DESCRIPTION,
|
|
5119
|
+
options: [
|
|
5120
|
+
explained
|
|
5121
|
+
],
|
|
5122
|
+
...option.reason == null ? {} : {
|
|
5123
|
+
reason: option.reason,
|
|
5124
|
+
explanation: MEMORY_EXECUTION_EXPLANATIONS[option.reason]
|
|
5125
|
+
}
|
|
5126
|
+
});
|
|
5127
|
+
});
|
|
5128
|
+
if (steps[0]?.executedIn !== "database") {
|
|
5129
|
+
steps.unshift({
|
|
5130
|
+
step: 0,
|
|
5131
|
+
of: 0,
|
|
5132
|
+
executedIn: "database",
|
|
5133
|
+
description: UNNARROWED_READ_DESCRIPTION,
|
|
5134
|
+
options: []
|
|
5135
|
+
});
|
|
5136
|
+
}
|
|
5137
|
+
for(let i = 0; i < steps.length; i++){
|
|
5138
|
+
steps[i].step = i + 1;
|
|
5139
|
+
steps[i].of = steps.length;
|
|
5140
|
+
}
|
|
5141
|
+
return steps;
|
|
5142
|
+
};
|
|
5143
|
+
/**
|
|
5144
|
+
* Builds the explanation from the resolved options, with no plugin involvement.
|
|
5145
|
+
*
|
|
5146
|
+
* Takes the collection BEFORE `split()`, and throws otherwise. Splitting re-adds each half
|
|
5147
|
+
* into a fresh collection, which re-derives targets without the options that caused them — a
|
|
5148
|
+
* post-join filter alone in the memory half derives back to `"database"`, and the document
|
|
5149
|
+
* would report memory work as having run in the database.
|
|
5150
|
+
*/ const explainQuery = (options, context)=>{
|
|
5151
|
+
if (options.isDerived === true) {
|
|
5152
|
+
throw new Error("explainQuery was given a collection produced by split() or splitAt(). Those re-derive " + "execution targets without the options that caused them, so the explanation would report " + "memory work as having run in the database. Pass the collection as it was resolved, " + "before splitting.");
|
|
5153
|
+
}
|
|
5154
|
+
const executionSteps = toExecutionSteps(options);
|
|
5155
|
+
return {
|
|
5156
|
+
collection: context.collection,
|
|
5157
|
+
database: context.database,
|
|
5158
|
+
summary: summarize(executionSteps),
|
|
5159
|
+
executionSteps,
|
|
5160
|
+
plugin: {
|
|
5161
|
+
kind: context.pluginKind
|
|
5162
|
+
}
|
|
5163
|
+
};
|
|
5164
|
+
};
|
|
5165
|
+
/**
|
|
5166
|
+
* Attaches what the backend reported to the step that was sent to it.
|
|
5167
|
+
*
|
|
5168
|
+
* Reporting is optional for a plugin, so an empty report is not an error: the step is marked
|
|
5169
|
+
* `executedQueriesUnsupported` instead, and the rest of the explanation stands — the pushdown
|
|
5170
|
+
* analysis comes from the options and is correct with or without the plugin's statements.
|
|
5171
|
+
*
|
|
5172
|
+
* Copies the steps rather than writing into them, so the explanation a caller already holds
|
|
5173
|
+
* does not gain statements after the fact. Options and their details are shared with the
|
|
5174
|
+
* original — nothing mutates them, and copying deeper would only look safer than it is.
|
|
5175
|
+
*/ const withExecutedQueries = (explanation, executedQueries)=>{
|
|
5176
|
+
let attached = false;
|
|
5177
|
+
const executionSteps = explanation.executionSteps.map((step)=>{
|
|
5178
|
+
// Only the first database step: a plugin reports what IT ran, and everything it ran
|
|
5179
|
+
// was sent as one dispatch. Stamping the same statements onto a second database step
|
|
5180
|
+
// would claim they ran twice.
|
|
5181
|
+
if (step.executedIn !== "database" || attached === true) {
|
|
5182
|
+
return {
|
|
5183
|
+
...step,
|
|
5184
|
+
options: [
|
|
5185
|
+
...step.options
|
|
5186
|
+
]
|
|
5187
|
+
};
|
|
5188
|
+
}
|
|
5189
|
+
attached = true;
|
|
5190
|
+
if (executedQueries.length === 0) {
|
|
5191
|
+
return {
|
|
5192
|
+
...step,
|
|
5193
|
+
options: [
|
|
5194
|
+
...step.options
|
|
5195
|
+
],
|
|
5196
|
+
executedQueriesUnsupported: EXECUTED_QUERIES_UNSUPPORTED
|
|
5197
|
+
};
|
|
5198
|
+
}
|
|
5199
|
+
return {
|
|
5200
|
+
...step,
|
|
5201
|
+
options: [
|
|
5202
|
+
...step.options
|
|
5203
|
+
],
|
|
5204
|
+
executedQueries: [
|
|
5205
|
+
...executedQueries
|
|
5206
|
+
]
|
|
5207
|
+
};
|
|
5208
|
+
});
|
|
5209
|
+
return {
|
|
5210
|
+
...explanation,
|
|
5211
|
+
executionSteps
|
|
5212
|
+
};
|
|
5213
|
+
};
|
|
5214
|
+
|
|
5215
|
+
;// CONCATENATED MODULE: ./src/plugins/query/formatExplanation.ts
|
|
5216
|
+
const OPTION_LABEL_WIDTH = 8;
|
|
5217
|
+
const WRAP_WIDTH = 68;
|
|
5218
|
+
/** Wraps `text` to `WRAP_WIDTH`, prefixing every line with `indent`. */ const wrap = (text, indent)=>{
|
|
5219
|
+
const lines = [];
|
|
5220
|
+
let line = "";
|
|
5221
|
+
for (const word of text.split(" ")){
|
|
5222
|
+
if (line.length > 0 && line.length + word.length + 1 > WRAP_WIDTH) {
|
|
5223
|
+
lines.push(indent + line);
|
|
5224
|
+
line = word;
|
|
5225
|
+
continue;
|
|
5226
|
+
}
|
|
5227
|
+
line = line.length === 0 ? word : `${line} ${word}`;
|
|
5228
|
+
}
|
|
5229
|
+
if (line.length > 0) {
|
|
5230
|
+
lines.push(indent + line);
|
|
5231
|
+
}
|
|
5232
|
+
return lines;
|
|
5233
|
+
};
|
|
5234
|
+
const COMPARATOR_SYMBOLS = {
|
|
5235
|
+
"equals": "===",
|
|
5236
|
+
"greater-than": ">",
|
|
5237
|
+
"greater-than-equals": ">=",
|
|
5238
|
+
"less-than": "<",
|
|
5239
|
+
"less-than-equals": "<="
|
|
5240
|
+
};
|
|
5241
|
+
const describeValue = (value)=>{
|
|
5242
|
+
if (value == null) {
|
|
5243
|
+
return "?";
|
|
5244
|
+
}
|
|
5245
|
+
if (value.k === "raw") {
|
|
5246
|
+
return typeof value.v === "string" ? `"${value.v}"` : String(value.v);
|
|
5247
|
+
}
|
|
5248
|
+
if (value.k === "date") {
|
|
5249
|
+
return value.v;
|
|
5250
|
+
}
|
|
5251
|
+
if (value.k === "array") {
|
|
5252
|
+
return `[${value.v.map(describeValue).join(", ")}]`;
|
|
5253
|
+
}
|
|
5254
|
+
return value.k === "undefined" ? "undefined" : String(value.v);
|
|
5255
|
+
};
|
|
5256
|
+
/** Renders a serialized expression back to something close to the source predicate. */ const describeExpression = (expression)=>{
|
|
5257
|
+
if (expression == null) {
|
|
5258
|
+
return "?";
|
|
5259
|
+
}
|
|
5260
|
+
if (expression.t === "operator") {
|
|
5261
|
+
return `${describeExpression(expression.left)} ${expression.operator} ${describeExpression(expression.right)}`;
|
|
5262
|
+
}
|
|
5263
|
+
if (expression.t === "comparator") {
|
|
5264
|
+
const left = describeExpression(expression.left);
|
|
5265
|
+
const right = describeExpression(expression.right);
|
|
5266
|
+
const symbol = COMPARATOR_SYMBOLS[expression.comparator];
|
|
5267
|
+
if (symbol == null) {
|
|
5268
|
+
return `${left}.${expression.comparator}(${right})${expression.negated === true ? " === false" : ""}`;
|
|
5269
|
+
}
|
|
5270
|
+
return `${left} ${expression.negated === true ? "!==" : symbol} ${right}`;
|
|
5271
|
+
}
|
|
5272
|
+
if (expression.t === "property") {
|
|
5273
|
+
return expression.path;
|
|
5274
|
+
}
|
|
5275
|
+
if (expression.t === "value") {
|
|
5276
|
+
return describeValue(expression.value);
|
|
5277
|
+
}
|
|
5278
|
+
return expression.t === "empty" ? "(no filter)" : "(not parsable)";
|
|
5279
|
+
};
|
|
5280
|
+
const describeOption = (option)=>{
|
|
5281
|
+
const detail = option.detail;
|
|
5282
|
+
if (detail == null) {
|
|
5283
|
+
return "";
|
|
5284
|
+
}
|
|
5285
|
+
if (option.name === "filter") {
|
|
5286
|
+
return detail.expression == null ? String(detail.expressionUnavailable ?? "") : describeExpression(detail.expression);
|
|
5287
|
+
}
|
|
5288
|
+
if (option.name === "sort") {
|
|
5289
|
+
return `${detail.propertyName} ${detail.direction}`;
|
|
5290
|
+
}
|
|
5291
|
+
if (option.name === "skip" || option.name === "take") {
|
|
5292
|
+
return String(detail.value);
|
|
5293
|
+
}
|
|
5294
|
+
if (option.name === "join") {
|
|
5295
|
+
return `${detail.kind} → ${detail.outerKey} = ${detail.innerKey}`;
|
|
5296
|
+
}
|
|
5297
|
+
if (option.name === "nearest") {
|
|
5298
|
+
return `${detail.propertyName}, ${detail.count} nearest`;
|
|
5299
|
+
}
|
|
5300
|
+
if (option.name === "map" || option.name === "group") {
|
|
5301
|
+
const fields = detail.fields;
|
|
5302
|
+
return fields.map((x)=>x.from === x.to ? x.from : `${x.from} → ${x.to}`).join(", ");
|
|
5303
|
+
}
|
|
5304
|
+
return "";
|
|
5305
|
+
};
|
|
5306
|
+
const formatStep = (step, lines)=>{
|
|
5307
|
+
const reason = step.reason == null ? "" : ` [${step.reason}]`;
|
|
5308
|
+
lines.push(` STEP ${step.step} of ${step.of} — ${step.executedIn}${reason}`);
|
|
5309
|
+
lines.push(...wrap(step.description, " "));
|
|
5310
|
+
if (step.explanation != null) {
|
|
5311
|
+
lines.push(...wrap(step.explanation, " "));
|
|
5312
|
+
}
|
|
5313
|
+
lines.push("");
|
|
5314
|
+
for (const option of step.options){
|
|
5315
|
+
lines.push(` ${option.name.padEnd(OPTION_LABEL_WIDTH)} ${describeOption(option)}`.trimEnd());
|
|
5316
|
+
}
|
|
5317
|
+
for (const executed of step.executedQueries ?? []){
|
|
5318
|
+
lines.push("");
|
|
5319
|
+
lines.push(...executed.text.split("\n").map((line)=>` ${line}`));
|
|
5320
|
+
if (executed.parameters != null && executed.parameters.length > 0) {
|
|
5321
|
+
lines.push(` parameters: ${JSON.stringify(executed.parameters)}`);
|
|
5322
|
+
}
|
|
5323
|
+
}
|
|
5324
|
+
if (step.executedQueriesUnsupported != null) {
|
|
5325
|
+
lines.push("");
|
|
5326
|
+
lines.push(...wrap(step.executedQueriesUnsupported, " "));
|
|
5327
|
+
}
|
|
5328
|
+
lines.push("");
|
|
5329
|
+
};
|
|
5330
|
+
/**
|
|
5331
|
+
* Renders an explanation for a terminal.
|
|
5332
|
+
*
|
|
5333
|
+
* The STEP headers carry the whole lesson: a reader who has never heard of pushdown still sees
|
|
5334
|
+
* that the statement in step 1 is not the entire query. Nobody should have to notice a missing
|
|
5335
|
+
* ORDER BY to work that out.
|
|
5336
|
+
*/ const formatExplanation = (explanation)=>{
|
|
5337
|
+
const { collection, database, summary, executionSteps } = explanation;
|
|
5338
|
+
const stepCount = `${executionSteps.length} ${executionSteps.length === 1 ? "step" : "steps"}`;
|
|
5339
|
+
const lines = [
|
|
5340
|
+
`${collection} · ${database} · ${stepCount}`,
|
|
5341
|
+
""
|
|
5342
|
+
];
|
|
5343
|
+
for (const step of executionSteps){
|
|
5344
|
+
formatStep(step, lines);
|
|
5345
|
+
}
|
|
5346
|
+
lines.push(...wrap(summary.explanation, " "));
|
|
5347
|
+
return lines.join("\n");
|
|
5348
|
+
};
|
|
5349
|
+
|
|
4961
5350
|
;// CONCATENATED MODULE: ./src/plugins/query/types.ts
|
|
4962
5351
|
var types_QueryOrdering = /*#__PURE__*/ function(QueryOrdering) {
|
|
4963
5352
|
QueryOrdering["Descending"] = "desc";
|
|
@@ -4972,6 +5361,8 @@ var types_QueryOrdering = /*#__PURE__*/ function(QueryOrdering) {
|
|
|
4972
5361
|
|
|
4973
5362
|
|
|
4974
5363
|
|
|
5364
|
+
|
|
5365
|
+
|
|
4975
5366
|
// EXTERNAL MODULE: ./src/expressions/evaluate.ts
|
|
4976
5367
|
var evaluate = __webpack_require__(379);
|
|
4977
5368
|
;// CONCATENATED MODULE: ./src/plugins/wire/query.ts
|
|
@@ -5443,6 +5834,7 @@ const createRequestHandler = (options)=>{
|
|
|
5443
5834
|
const queryOptions = deserializeQueryOptions(request.options, schema, resolveSchema, // Applied to the outer collection AND to every collection a join reaches, so a
|
|
5444
5835
|
// join cannot be used to read around a scope
|
|
5445
5836
|
(target)=>scopeExpressionFor(target, context, "query"));
|
|
5837
|
+
const executedQueries = [];
|
|
5446
5838
|
return await new Promise((resolve)=>{
|
|
5447
5839
|
plugin.query({
|
|
5448
5840
|
// `false`: nothing here attaches to a change tracker — the tracker lives on
|
|
@@ -5451,7 +5843,9 @@ const createRequestHandler = (options)=>{
|
|
|
5451
5843
|
schemas: schemas,
|
|
5452
5844
|
id: (0,uuid/* .uuid */.u)(8),
|
|
5453
5845
|
source: "RequestHandler",
|
|
5454
|
-
action: "query"
|
|
5846
|
+
action: "query",
|
|
5847
|
+
explain: request.explain,
|
|
5848
|
+
executedQueries
|
|
5455
5849
|
}, (result)=>{
|
|
5456
5850
|
if (result.ok === Result/* .PluginEventResult.ERROR */.D.ERROR) {
|
|
5457
5851
|
resolve(failed(result.error));
|
|
@@ -5460,7 +5854,13 @@ const createRequestHandler = (options)=>{
|
|
|
5460
5854
|
resolve({
|
|
5461
5855
|
ok: true,
|
|
5462
5856
|
kind: "query",
|
|
5463
|
-
value: result.data.value
|
|
5857
|
+
value: result.data.value,
|
|
5858
|
+
// Only when asked, and only what the plugin reported. A plugin
|
|
5859
|
+
// that reported nothing sends nothing, and the caller marks the
|
|
5860
|
+
// remote step as not reported.
|
|
5861
|
+
...request.explain === true && executedQueries.length > 0 ? {
|
|
5862
|
+
executedQueries
|
|
5863
|
+
} : {}
|
|
5464
5864
|
});
|
|
5465
5865
|
});
|
|
5466
5866
|
});
|
|
@@ -6109,6 +6509,10 @@ class EphemeralDataPlugin {
|
|
|
6109
6509
|
}
|
|
6110
6510
|
innerRows.push(cloneRecord(record));
|
|
6111
6511
|
}
|
|
6512
|
+
const narrowing = outerKeys == null ? "full scan" : `narrowed by ${outerKeys.size} outer ${outerKeys.size === 1 ? "key" : "keys"}`;
|
|
6513
|
+
event.executedQueries.push({
|
|
6514
|
+
text: `${innerSchema.collectionName}: scanned ${innerRows.length} in-memory ${innerRows.length === 1 ? "record" : "records"} for join inner side (${narrowing})`
|
|
6515
|
+
});
|
|
6112
6516
|
done({
|
|
6113
6517
|
ok: "success",
|
|
6114
6518
|
innerSide: {
|
|
@@ -6218,7 +6622,13 @@ class EphemeralDataPlugin {
|
|
|
6218
6622
|
* collection to pair it with three rows.
|
|
6219
6623
|
*
|
|
6220
6624
|
* `cloned` is in storage shape, so the keys are read by resolved column name.
|
|
6221
|
-
*/
|
|
6625
|
+
*/ // No statement to quote — an ephemeral store walks its own records. Said
|
|
6626
|
+
// plainly so `.explain()` does not leave a reader wondering whether the
|
|
6627
|
+
// plugin simply failed to report. Before the inner side, to match execution order.
|
|
6628
|
+
event.executedQueries.push({
|
|
6629
|
+
text: `${operation.schema.collectionName}: scanned ${cloned.length} in-memory ${cloned.length === 1 ? "record" : "records"}`
|
|
6630
|
+
});
|
|
6631
|
+
const joinOption = operation.options.getLast("join");
|
|
6222
6632
|
const outerKeys = joinOption == null ? null : distinctJoinKeys(cloned, joinOption.value.outerKey, joinOption.value.semiJoinKeyThreshold, {
|
|
6223
6633
|
storageShape: true
|
|
6224
6634
|
});
|
|
@@ -6311,7 +6721,7 @@ class RetryDbPlugin {
|
|
|
6311
6721
|
* `PropertyInfo` objects carrying functions and would not survive `JSON.stringify`. A filter is
|
|
6312
6722
|
* identified by its source text plus its params, which is what the expression is derived from
|
|
6313
6723
|
* anyway — two queries with the same source and params are the same query.
|
|
6314
|
-
*/ const
|
|
6724
|
+
*/ const CacheDbPlugin_describeOption = (option)=>{
|
|
6315
6725
|
const value = option.value;
|
|
6316
6726
|
switch(option.name){
|
|
6317
6727
|
case "filter":
|
|
@@ -6345,7 +6755,7 @@ class CacheDbPlugin {
|
|
|
6345
6755
|
/** `schemaId` first, so invalidating a schema is a prefix match. */ keyFor(event) {
|
|
6346
6756
|
const parts = [];
|
|
6347
6757
|
event.operation.options.forEach((option)=>{
|
|
6348
|
-
parts.push(`${option.name}:${
|
|
6758
|
+
parts.push(`${option.name}:${CacheDbPlugin_describeOption(option)}`);
|
|
6349
6759
|
});
|
|
6350
6760
|
return `${String(event.operation.schema.id)}\u0000${parts.join("\u0001")}`;
|
|
6351
6761
|
}
|
|
@@ -6375,6 +6785,12 @@ class CacheDbPlugin {
|
|
|
6375
6785
|
// Re-set to move it to the end of the insertion order: most recently used.
|
|
6376
6786
|
this.entries.delete(key);
|
|
6377
6787
|
this.entries.set(key, cached);
|
|
6788
|
+
// Said rather than left blank. A hit means no database was touched, which is a fact
|
|
6789
|
+
// worth reporting — and an empty report would otherwise read as a plugin that failed
|
|
6790
|
+
// to say what it ran.
|
|
6791
|
+
event.executedQueries.push({
|
|
6792
|
+
text: "cache hit — no query was executed"
|
|
6793
|
+
});
|
|
6378
6794
|
done(Result/* .PluginEventResult.success */.D.success(event.id, this.rebuild(cached)));
|
|
6379
6795
|
return;
|
|
6380
6796
|
}
|
|
@@ -6772,8 +7188,26 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6772
7188
|
class QueryOptionsCollection {
|
|
6773
7189
|
options = new Map();
|
|
6774
7190
|
nextExecutionTarget = "database";
|
|
7191
|
+
nextExecutionReason = null;
|
|
6775
7192
|
nextIndex = 0;
|
|
6776
7193
|
enumeratedItems = [];
|
|
7194
|
+
/** Cuts over to memory execution, keeping the first cause. See `MemoryExecutionReason`. */ cutOverToMemory(reason) {
|
|
7195
|
+
this.nextExecutionTarget = "memory";
|
|
7196
|
+
if (this.nextExecutionReason == null) {
|
|
7197
|
+
this.nextExecutionReason = reason;
|
|
7198
|
+
}
|
|
7199
|
+
}
|
|
7200
|
+
/**
|
|
7201
|
+
* True when `split()` or `splitAt()` produced this collection.
|
|
7202
|
+
*
|
|
7203
|
+
* Those rebuild each half by re-adding its options, which re-derives execution targets
|
|
7204
|
+
* without the options that caused them — a post-join filter alone in the memory half
|
|
7205
|
+
* derives back to `"database"`. Anything reading `target` as a report of where work runs
|
|
7206
|
+
* has to reject a derived collection; see `explainQuery`.
|
|
7207
|
+
*/ derived = false;
|
|
7208
|
+
get isDerived() {
|
|
7209
|
+
return this.derived;
|
|
7210
|
+
}
|
|
6777
7211
|
get items() {
|
|
6778
7212
|
return this.options;
|
|
6779
7213
|
}
|
|
@@ -6794,7 +7228,7 @@ class QueryOptionsCollection {
|
|
|
6794
7228
|
if (mapValue.fields.some((x)=>x.isRename === true) || mapValue.fields.some((x)=>x.property?.isUnmapped === true)) {
|
|
6795
7229
|
// Cut over to memory execution since we are renaming a property with .map
|
|
6796
7230
|
// We do not want to figure out how the new name flows through the entire query
|
|
6797
|
-
this.
|
|
7231
|
+
this.cutOverToMemory("map-rename");
|
|
6798
7232
|
}
|
|
6799
7233
|
}
|
|
6800
7234
|
if (name === "filter") {
|
|
@@ -6806,13 +7240,13 @@ class QueryOptionsCollection {
|
|
|
6806
7240
|
return;
|
|
6807
7241
|
}
|
|
6808
7242
|
if (filterValue.expression.type === "not-parsable") {
|
|
6809
|
-
this.
|
|
7243
|
+
this.cutOverToMemory("not-parsable");
|
|
6810
7244
|
} else {
|
|
6811
7245
|
(0,_expressions_utils__rspack_import_0/* .forEach */.j)(filterValue.expression, (expression)=>{
|
|
6812
7246
|
if ((0,_assertions__rspack_import_1/* .isPropertyExpression */.e3)(expression) && expression.property.isUnmapped) {
|
|
6813
7247
|
// Cut over to memory execution, unmapped properties are not in the database and
|
|
6814
7248
|
// cannot be queried
|
|
6815
|
-
this.
|
|
7249
|
+
this.cutOverToMemory("unmapped-property");
|
|
6816
7250
|
return false;
|
|
6817
7251
|
}
|
|
6818
7252
|
if ((0,_assertions__rspack_import_1/* .isPropertyExpression */.e3)(expression) && expression.property.hasRenamedSegments) {
|
|
@@ -6820,7 +7254,7 @@ class QueryOptionsCollection {
|
|
|
6820
7254
|
// `from` (storage) names, but filter selectors reference the
|
|
6821
7255
|
// in-memory names. Memory execution runs after deserialization,
|
|
6822
7256
|
// where the in-memory names exist
|
|
6823
|
-
this.
|
|
7257
|
+
this.cutOverToMemory("renamed-property");
|
|
6824
7258
|
return false;
|
|
6825
7259
|
}
|
|
6826
7260
|
return true;
|
|
@@ -6831,8 +7265,10 @@ class QueryOptionsCollection {
|
|
|
6831
7265
|
const sortValue = value;
|
|
6832
7266
|
// Same rule as filters: sort selectors reference in-memory names, which
|
|
6833
7267
|
// only exist after deserialization when the property is renamed or unmapped
|
|
6834
|
-
if (sortValue.property != null &&
|
|
6835
|
-
this.
|
|
7268
|
+
if (sortValue.property != null && sortValue.property.isUnmapped) {
|
|
7269
|
+
this.cutOverToMemory("unmapped-property");
|
|
7270
|
+
} else if (sortValue.property != null && sortValue.property.hasRenamedSegments) {
|
|
7271
|
+
this.cutOverToMemory("renamed-property");
|
|
6836
7272
|
}
|
|
6837
7273
|
}
|
|
6838
7274
|
if (name === "nearest") {
|
|
@@ -6843,8 +7279,10 @@ class QueryOptionsCollection {
|
|
|
6843
7279
|
//
|
|
6844
7280
|
// This is also what lets every translator's in-memory fallback read the column by
|
|
6845
7281
|
// its resolved name — anything whose storage name differs never reaches them.
|
|
6846
|
-
if (nearestValue.property != null &&
|
|
6847
|
-
this.
|
|
7282
|
+
if (nearestValue.property != null && nearestValue.property.isUnmapped) {
|
|
7283
|
+
this.cutOverToMemory("unmapped-property");
|
|
7284
|
+
} else if (nearestValue.property != null && nearestValue.property.hasRenamedSegments) {
|
|
7285
|
+
this.cutOverToMemory("renamed-property");
|
|
6848
7286
|
}
|
|
6849
7287
|
}
|
|
6850
7288
|
if (name === "join") {
|
|
@@ -6856,7 +7294,7 @@ class QueryOptionsCollection {
|
|
|
6856
7294
|
// Set BEFORE the item is created, unlike `nearest`'s ratchet below, because this
|
|
6857
7295
|
// moves the join option itself rather than everything after it.
|
|
6858
7296
|
if (joinValue.crossPlugin === true) {
|
|
6859
|
-
this.
|
|
7297
|
+
this.cutOverToMemory("cross-plugin-join");
|
|
6860
7298
|
}
|
|
6861
7299
|
}
|
|
6862
7300
|
const item = {
|
|
@@ -6864,7 +7302,10 @@ class QueryOptionsCollection {
|
|
|
6864
7302
|
option: {
|
|
6865
7303
|
name,
|
|
6866
7304
|
target: this.nextExecutionTarget,
|
|
6867
|
-
value
|
|
7305
|
+
value,
|
|
7306
|
+
...this.nextExecutionReason == null ? {} : {
|
|
7307
|
+
reason: this.nextExecutionReason
|
|
7308
|
+
}
|
|
6868
7309
|
}
|
|
6869
7310
|
};
|
|
6870
7311
|
this.nextIndex++;
|
|
@@ -6887,7 +7328,7 @@ class QueryOptionsCollection {
|
|
|
6887
7328
|
//
|
|
6888
7329
|
// A plugin that DID push the search down loses nothing but the chance to also
|
|
6889
7330
|
// push down what follows it, which is a limit over ten rows.
|
|
6890
|
-
this.
|
|
7331
|
+
this.cutOverToMemory("after-nearest");
|
|
6891
7332
|
}
|
|
6892
7333
|
if (name === "join") {
|
|
6893
7334
|
// Everything AFTER a join runs in memory, for the same reason as `nearest`: this
|
|
@@ -6898,7 +7339,7 @@ class QueryOptionsCollection {
|
|
|
6898
7339
|
// OUTER rows read, not the pairs produced — a plausible-looking result with the
|
|
6899
7340
|
// wrong number of rows in it. Conjuncts that can safely run earlier are split off
|
|
6900
7341
|
// by the query builder BEFORE dispatch, which is the only exception.
|
|
6901
|
-
this.
|
|
7342
|
+
this.cutOverToMemory("after-join");
|
|
6902
7343
|
}
|
|
6903
7344
|
}
|
|
6904
7345
|
/**
|
|
@@ -6912,6 +7353,8 @@ class QueryOptionsCollection {
|
|
|
6912
7353
|
const sortedItems = this.enumeratedItems.toSorted((a, b)=>a.index - b.index);
|
|
6913
7354
|
const before = new QueryOptionsCollection();
|
|
6914
7355
|
const after = new QueryOptionsCollection();
|
|
7356
|
+
before.derived = true;
|
|
7357
|
+
after.derived = true;
|
|
6915
7358
|
let at = null;
|
|
6916
7359
|
for(let i = 0, length = sortedItems.length; i < length; i++){
|
|
6917
7360
|
const { option } = sortedItems[i];
|
|
@@ -6945,10 +7388,12 @@ class QueryOptionsCollection {
|
|
|
6945
7388
|
]
|
|
6946
7389
|
]));
|
|
6947
7390
|
const nextExecutionTarget = this.nextExecutionTarget;
|
|
7391
|
+
const nextExecutionReason = this.nextExecutionReason;
|
|
6948
7392
|
const nextIndex = this.nextIndex;
|
|
6949
7393
|
return ()=>{
|
|
6950
7394
|
this.options = new Map(options);
|
|
6951
7395
|
this.nextExecutionTarget = nextExecutionTarget;
|
|
7396
|
+
this.nextExecutionReason = nextExecutionReason;
|
|
6952
7397
|
this.nextIndex = nextIndex;
|
|
6953
7398
|
this.enumeratedItems = [];
|
|
6954
7399
|
};
|
|
@@ -6958,6 +7403,8 @@ class QueryOptionsCollection {
|
|
|
6958
7403
|
const sortedItems = this.enumeratedItems.toSorted((a, b)=>a.index - b.index);
|
|
6959
7404
|
const memoryQueryOptionsCollection = new QueryOptionsCollection();
|
|
6960
7405
|
const databaseQueryOptionsCollection = new QueryOptionsCollection();
|
|
7406
|
+
memoryQueryOptionsCollection.derived = true;
|
|
7407
|
+
databaseQueryOptionsCollection.derived = true;
|
|
6961
7408
|
for(let i = 0, length = sortedItems.length; i < length; i++){
|
|
6962
7409
|
const sortedItem = sortedItems[i];
|
|
6963
7410
|
if (sortedItem.option.target === "database") {
|
|
@@ -13744,6 +14191,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13744
14191
|
Jd: () => (/* reexport safe */ _plugins__rspack_import_7.Jd),
|
|
13745
14192
|
KB: () => (/* reexport safe */ _plugins__rspack_import_7.KB),
|
|
13746
14193
|
KC: () => (/* reexport safe */ _schema__rspack_import_9.KC),
|
|
14194
|
+
Kg: () => (/* reexport safe */ _plugins__rspack_import_7.Kg),
|
|
13747
14195
|
Ko: () => (/* reexport safe */ _expressions__rspack_import_4.Ko),
|
|
13748
14196
|
Kp: () => (/* reexport safe */ _collections__rspack_import_2.r4),
|
|
13749
14197
|
L$: () => (/* reexport safe */ _schema__rspack_import_9.L$),
|
|
@@ -13791,6 +14239,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13791
14239
|
_h: () => (/* reexport safe */ _schema__rspack_import_9._h),
|
|
13792
14240
|
_t: () => (/* reexport safe */ _schema__rspack_import_9._t),
|
|
13793
14241
|
_v: () => (/* reexport safe */ _collections__rspack_import_2._v),
|
|
14242
|
+
ae: () => (/* reexport safe */ _plugins__rspack_import_7.ae),
|
|
13794
14243
|
ap: () => (/* reexport safe */ _utilities__rspack_import_10.ap),
|
|
13795
14244
|
as: () => (/* reexport safe */ _plugins__rspack_import_7.as),
|
|
13796
14245
|
av: () => (/* reexport safe */ _utilities__rspack_import_10.av),
|
|
@@ -13807,6 +14256,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13807
14256
|
fe: () => (/* reexport safe */ _codegen__rspack_import_1.fe),
|
|
13808
14257
|
fw: () => (/* reexport safe */ _expressions__rspack_import_4.fw),
|
|
13809
14258
|
g5: () => (/* reexport safe */ _collections__rspack_import_2.g5),
|
|
14259
|
+
gH: () => (/* reexport safe */ _plugins__rspack_import_7.gH),
|
|
13810
14260
|
gZ: () => (/* reexport safe */ _utilities__rspack_import_10.gZ),
|
|
13811
14261
|
g_: () => (/* reexport safe */ _schema__rspack_import_9.g_),
|
|
13812
14262
|
ge: () => (/* reexport safe */ _schema__rspack_import_9.ge),
|
|
@@ -13818,6 +14268,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13818
14268
|
iG: () => (/* reexport safe */ _plugins__rspack_import_7.iG),
|
|
13819
14269
|
ix: () => (/* reexport safe */ _schema__rspack_import_9.ix),
|
|
13820
14270
|
j7: () => (/* reexport safe */ _codegen__rspack_import_1.j7),
|
|
14271
|
+
jE: () => (/* reexport safe */ _plugins__rspack_import_7.jE),
|
|
13821
14272
|
jJ: () => (/* reexport safe */ _expressions__rspack_import_4.jJ),
|
|
13822
14273
|
jO: () => (/* reexport safe */ _plugins__rspack_import_7.jO),
|
|
13823
14274
|
jV: () => (/* reexport safe */ _utilities__rspack_import_10.Cg),
|
|
@@ -13859,6 +14310,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13859
14310
|
tX: () => (/* reexport safe */ _utilities__rspack_import_10.tX),
|
|
13860
14311
|
uR: () => (/* reexport safe */ _utilities__rspack_import_10.uR),
|
|
13861
14312
|
vF: () => (/* reexport safe */ _utilities__rspack_import_10.vF),
|
|
14313
|
+
vZ: () => (/* reexport safe */ _plugins__rspack_import_7.vZ),
|
|
13862
14314
|
vg: () => (/* reexport safe */ _assertions__rspack_import_0.vg),
|
|
13863
14315
|
wL: () => (/* reexport safe */ _assertions__rspack_import_0.wL),
|
|
13864
14316
|
wM: () => (/* reexport safe */ _collections__rspack_import_2.wM),
|
|
@@ -13885,7 +14337,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13885
14337
|
/* import */ var _expressions__rspack_import_4 = __webpack_require__(138);
|
|
13886
14338
|
/* import */ var _performance__rspack_import_5 = __webpack_require__(971);
|
|
13887
14339
|
/* import */ var _pipeline__rspack_import_6 = __webpack_require__(314);
|
|
13888
|
-
/* import */ var _plugins__rspack_import_7 = __webpack_require__(
|
|
14340
|
+
/* import */ var _plugins__rspack_import_7 = __webpack_require__(301);
|
|
13889
14341
|
/* import */ var _results__rspack_import_8 = __webpack_require__(264);
|
|
13890
14342
|
/* import */ var _schema__rspack_import_9 = __webpack_require__(755);
|
|
13891
14343
|
/* import */ var _utilities__rspack_import_10 = __webpack_require__(222);
|
|
@@ -13921,6 +14373,7 @@ var __webpack_exports__ConcurrencyDbPlugin = __webpack_exports__.bX;
|
|
|
13921
14373
|
var __webpack_exports__ContainerBlock = __webpack_exports__.j7;
|
|
13922
14374
|
var __webpack_exports__DEFAULT_SEMI_JOIN_KEY_THRESHOLD = __webpack_exports__._b;
|
|
13923
14375
|
var __webpack_exports__DataTranslator = __webpack_exports__.JF;
|
|
14376
|
+
var __webpack_exports__EXECUTED_QUERIES_UNSUPPORTED = __webpack_exports__.jE;
|
|
13924
14377
|
var __webpack_exports__EXPRESSION_TYPES = __webpack_exports__.tA;
|
|
13925
14378
|
var __webpack_exports__EmptyExpression = __webpack_exports__.Sm;
|
|
13926
14379
|
var __webpack_exports__EphemeralDataPlugin = __webpack_exports__.Jd;
|
|
@@ -13932,6 +14385,7 @@ var __webpack_exports__IdSet = __webpack_exports__.wp;
|
|
|
13932
14385
|
var __webpack_exports__IfBuilder = __webpack_exports__.Zm;
|
|
13933
14386
|
var __webpack_exports__JsonTranslator = __webpack_exports__.d0;
|
|
13934
14387
|
var __webpack_exports__LOG_LEVELS = __webpack_exports__.p_;
|
|
14388
|
+
var __webpack_exports__MEMORY_EXECUTION_EXPLANATIONS = __webpack_exports__.gH;
|
|
13935
14389
|
var __webpack_exports__MemoryDataCollection = __webpack_exports__._v;
|
|
13936
14390
|
var __webpack_exports__NotParsableExpression = __webpack_exports__.SC;
|
|
13937
14391
|
var __webpack_exports__ObjectBuilder = __webpack_exports__.Tl;
|
|
@@ -14017,9 +14471,11 @@ var __webpack_exports__deserializeQueryOptions = __webpack_exports__.II;
|
|
|
14017
14471
|
var __webpack_exports__distinctJoinKeys = __webpack_exports__.RK;
|
|
14018
14472
|
var __webpack_exports__evaluate = __webpack_exports__._3;
|
|
14019
14473
|
var __webpack_exports__executeJoin = __webpack_exports__.m6;
|
|
14474
|
+
var __webpack_exports__explainQuery = __webpack_exports__.ae;
|
|
14020
14475
|
var __webpack_exports__extractTypeInfo = __webpack_exports__.Od;
|
|
14021
14476
|
var __webpack_exports__fastHash = __webpack_exports__.Nr;
|
|
14022
14477
|
var __webpack_exports__forEach = __webpack_exports__.jJ;
|
|
14478
|
+
var __webpack_exports__formatExplanation = __webpack_exports__.vZ;
|
|
14023
14479
|
var __webpack_exports__getLogLevel = __webpack_exports__.o_;
|
|
14024
14480
|
var __webpack_exports__getProperties = __webpack_exports__.oY;
|
|
14025
14481
|
var __webpack_exports__hasPrimitiveElements = __webpack_exports__.LL;
|
|
@@ -14068,6 +14524,7 @@ var __webpack_exports__toStrictPredicate = __webpack_exports__.wS;
|
|
|
14068
14524
|
var __webpack_exports__unsafeCast = __webpack_exports__.sz;
|
|
14069
14525
|
var __webpack_exports__uuid = __webpack_exports__.uR;
|
|
14070
14526
|
var __webpack_exports__uuidv4 = __webpack_exports__.gZ;
|
|
14071
|
-
|
|
14527
|
+
var __webpack_exports__withExecutedQueries = __webpack_exports__.Kg;
|
|
14528
|
+
export { __webpack_exports__AndBuilder as AndBuilder, __webpack_exports__ArrayBuilder as ArrayBuilder, __webpack_exports__AssignmentBuilder as AssignmentBuilder, __webpack_exports__BatchingDbPlugin as BatchingDbPlugin, __webpack_exports__Block as Block, __webpack_exports__BulkPersistChanges as BulkPersistChanges, __webpack_exports__BulkPersistResult as BulkPersistResult, __webpack_exports__CacheDbPlugin as CacheDbPlugin, __webpack_exports__Capability as Capability, __webpack_exports__CodeBuilder as CodeBuilder, __webpack_exports__ComparatorExpression as ComparatorExpression, __webpack_exports__ConcurrencyDbPlugin as ConcurrencyDbPlugin, __webpack_exports__ContainerBlock as ContainerBlock, __webpack_exports__DEFAULT_SEMI_JOIN_KEY_THRESHOLD as DEFAULT_SEMI_JOIN_KEY_THRESHOLD, __webpack_exports__DataTranslator as DataTranslator, __webpack_exports__EXECUTED_QUERIES_UNSUPPORTED as EXECUTED_QUERIES_UNSUPPORTED, __webpack_exports__EXPRESSION_TYPES as EXPRESSION_TYPES, __webpack_exports__EmptyExpression as EmptyExpression, __webpack_exports__EphemeralDataPlugin as EphemeralDataPlugin, __webpack_exports__Expression as Expression, __webpack_exports__FunctionBuilder as FunctionBuilder, __webpack_exports__FunctionFactoryBuilder as FunctionFactoryBuilder, __webpack_exports__HashType as HashType, __webpack_exports__IdSet as IdSet, __webpack_exports__IfBuilder as IfBuilder, __webpack_exports__JsonTranslator as JsonTranslator, __webpack_exports__LOG_LEVELS as LOG_LEVELS, __webpack_exports__MEMORY_EXECUTION_EXPLANATIONS as MEMORY_EXECUTION_EXPLANATIONS, __webpack_exports__MemoryDataCollection as MemoryDataCollection, __webpack_exports__NotParsableExpression as NotParsableExpression, __webpack_exports__ObjectBuilder as ObjectBuilder, __webpack_exports__OperatorExpression as OperatorExpression, __webpack_exports__OptimisticConcurrencyError as OptimisticConcurrencyError, __webpack_exports__PerformanceCapability as PerformanceCapability, __webpack_exports__PluginDestroyedError as PluginDestroyedError, __webpack_exports__PluginEventResult as PluginEventResult, __webpack_exports__PropertyExpression as PropertyExpression, __webpack_exports__PropertyInfo as PropertyInfo, __webpack_exports__Query as Query, __webpack_exports__QueryOptionsCollection as QueryOptionsCollection, __webpack_exports__QueryOrdering as QueryOrdering, __webpack_exports__RawBuilder as RawBuilder, __webpack_exports__ReadonlySchemaCollection as ReadonlySchemaCollection, __webpack_exports__Result as Result, __webpack_exports__RetryDbPlugin as RetryDbPlugin, __webpack_exports__SchemaArray as SchemaArray, __webpack_exports__SchemaBase as SchemaBase, __webpack_exports__SchemaBoolean as SchemaBoolean, __webpack_exports__SchemaCollection as SchemaCollection, __webpack_exports__SchemaComputed as SchemaComputed, __webpack_exports__SchemaDate as SchemaDate, __webpack_exports__SchemaDefault as SchemaDefault, __webpack_exports__SchemaDefinition as SchemaDefinition, __webpack_exports__SchemaDeserialize as SchemaDeserialize, __webpack_exports__SchemaDistinct as SchemaDistinct, __webpack_exports__SchemaError as SchemaError, __webpack_exports__SchemaFile as SchemaFile, __webpack_exports__SchemaForeignKey as SchemaForeignKey, __webpack_exports__SchemaFrom as SchemaFrom, __webpack_exports__SchemaFunction as SchemaFunction, __webpack_exports__SchemaIdentity as SchemaIdentity, __webpack_exports__SchemaIndex as SchemaIndex, __webpack_exports__SchemaKey as SchemaKey, __webpack_exports__SchemaNullable as SchemaNullable, __webpack_exports__SchemaNumber as SchemaNumber, __webpack_exports__SchemaObject as SchemaObject, __webpack_exports__SchemaOptional as SchemaOptional, __webpack_exports__SchemaPersistChanges as SchemaPersistChanges, __webpack_exports__SchemaPersistResult as SchemaPersistResult, __webpack_exports__SchemaReadonly as SchemaReadonly, __webpack_exports__SchemaSearchable as SchemaSearchable, __webpack_exports__SchemaSerialize as SchemaSerialize, __webpack_exports__SchemaString as SchemaString, __webpack_exports__SchemaTag as SchemaTag, __webpack_exports__SchemaTracked as SchemaTracked, __webpack_exports__SchemaTransform as SchemaTransform, __webpack_exports__SchemaTypes as SchemaTypes, __webpack_exports__SchemaVector as SchemaVector, __webpack_exports__SlotBlock as SlotBlock, __webpack_exports__SqlTranslator as SqlTranslator, __webpack_exports__StringBuilder as StringBuilder, __webpack_exports__SyncronousQueue as SyncronousQueue, __webpack_exports__TagCollection as TagCollection, __webpack_exports__TracingCapability as TracingCapability, __webpack_exports__TrampolinePipeline as TrampolinePipeline, __webpack_exports__TranslatedArrayValue as TranslatedArrayValue, __webpack_exports__TranslatedGroupValue as TranslatedGroupValue, __webpack_exports__TranslatedSingleValue as TranslatedSingleValue, __webpack_exports__TupleTranslator as TupleTranslator, __webpack_exports__ValueExpression as ValueExpression, __webpack_exports__VariableBuilder as VariableBuilder, __webpack_exports__WorkPipeline as WorkPipeline, __webpack_exports__applyInnerOptions as applyInnerOptions, __webpack_exports__assertDate as assertDate, __webpack_exports__assertInstanceOf as assertInstanceOf, __webpack_exports__assertIsArray as assertIsArray, __webpack_exports__assertIsNotNull as assertIsNotNull, __webpack_exports__assertIsNumber as assertIsNumber, __webpack_exports__assertString as assertString, __webpack_exports__cast as cast, __webpack_exports__clone as clone, __webpack_exports__combineExpressions as combineExpressions, __webpack_exports__combineQueryOptionsCollections as combineQueryOptionsCollections, __webpack_exports__compiledSchemaToJsonSchema as compiledSchemaToJsonSchema, __webpack_exports__cosineDistance as cosineDistance, __webpack_exports__createRequestHandler as createRequestHandler, __webpack_exports__createStandardJsonSchemaProps as createStandardJsonSchemaProps, __webpack_exports__deserializeBulkPersist as deserializeBulkPersist, __webpack_exports__deserializePersistResult as deserializePersistResult, __webpack_exports__deserializeQueryOptions as deserializeQueryOptions, __webpack_exports__distinctJoinKeys as distinctJoinKeys, __webpack_exports__evaluate as evaluate, __webpack_exports__executeJoin as executeJoin, __webpack_exports__explainQuery as explainQuery, __webpack_exports__extractTypeInfo as extractTypeInfo, __webpack_exports__fastHash as fastHash, __webpack_exports__forEach as forEach, __webpack_exports__formatExplanation as formatExplanation, __webpack_exports__getLogLevel as getLogLevel, __webpack_exports__getProperties as getProperties, __webpack_exports__hasPrimitiveElements as hasPrimitiveElements, __webpack_exports__hash as hash, __webpack_exports__hashJoin as hashJoin, __webpack_exports__isArrayValued as isArrayValued, __webpack_exports__isComparatorExpression as isComparatorExpression, __webpack_exports__isDate as isDate, __webpack_exports__isEmptyExpression as isEmptyExpression, __webpack_exports__isExpression as isExpression, __webpack_exports__isLogLevelEnabled as isLogLevelEnabled, __webpack_exports__isNodeRuntime as isNodeRuntime, __webpack_exports__isNotParsableExpression as isNotParsableExpression, __webpack_exports__isOperatorExpression as isOperatorExpression, __webpack_exports__isPropertyExpression as isPropertyExpression, __webpack_exports__isValueExpression as isValueExpression, __webpack_exports__joinInPlugin as joinInPlugin, __webpack_exports__loadJoinInnerSide as loadJoinInnerSide, __webpack_exports__logger as logger, __webpack_exports__measure as measure, __webpack_exports__nearestBy as nearestBy, __webpack_exports__noop as noop, __webpack_exports__now as now, __webpack_exports__parseFragment as parseFragment, __webpack_exports__propertyInfoToJsonSchema as propertyInfoToJsonSchema, __webpack_exports__readJoinKey as readJoinKey, __webpack_exports__rehydrateSchemaFromJsonSchema as rehydrateSchemaFromJsonSchema, __webpack_exports__rehydrateSchemaFromJsonString as rehydrateSchemaFromJsonString, __webpack_exports__resetLogLevel as resetLogLevel, __webpack_exports__resolveBulkPersistChanges as resolveBulkPersistChanges, __webpack_exports__s as s, __webpack_exports__semiJoinFilter as semiJoinFilter, __webpack_exports__serializeBulkPersist as serializeBulkPersist, __webpack_exports__serializePersistResult as serializePersistResult, __webpack_exports__serializeQueryOptions as serializeQueryOptions, __webpack_exports__setLogLevel as setLogLevel, __webpack_exports__splitSendableOptions as splitSendableOptions, __webpack_exports__stringifyObject as stringifyObject, __webpack_exports__toEntityShape as toEntityShape, __webpack_exports__toEventArray as toEventArray, __webpack_exports__toExpression as toExpression, __webpack_exports__toMap as toMap, __webpack_exports__toPredicate as toPredicate, __webpack_exports__toPromise as toPromise, __webpack_exports__toStrictPredicate as toStrictPredicate, __webpack_exports__unsafeCast as unsafeCast, __webpack_exports__uuid as uuid, __webpack_exports__uuidv4 as uuidv4, __webpack_exports__withExecutedQueries as withExecutedQueries };
|
|
14072
14529
|
|
|
14073
14530
|
//# sourceMappingURL=index.js.map
|