@rocicorp/zero 0.21.2025052103 → 0.21.2025052900
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/out/ast-to-zql/src/ast-to-zql.js +1 -1
- package/out/ast-to-zql/src/ast-to-zql.js.map +1 -1
- package/out/ast-to-zql/src/format.d.ts.map +1 -1
- package/out/ast-to-zql/src/format.js +1 -8
- package/out/ast-to-zql/src/format.js.map +1 -1
- package/out/{chunk-ZQLO2WTQ.js → chunk-AYXJ7KBG.js} +14 -9
- package/out/{chunk-ZQLO2WTQ.js.map → chunk-AYXJ7KBG.js.map} +2 -2
- package/out/{chunk-67DEDR65.js → chunk-JZAY4BJA.js} +2 -2
- package/out/{chunk-Y5SC5VIM.js → chunk-UAWIBMWA.js} +15 -6
- package/out/chunk-UAWIBMWA.js.map +7 -0
- package/out/{inspector-VQFIQSJR.js → inspector-KBNUEBWB.js} +6 -4
- package/out/inspector-KBNUEBWB.js.map +7 -0
- package/out/react.js +1 -1
- package/out/solid.js +3 -3
- package/out/z2s/src/compiler.d.ts +1 -1
- package/out/z2s/src/compiler.d.ts.map +1 -1
- package/out/z2s/src/compiler.js +9 -3
- package/out/z2s/src/compiler.js.map +1 -1
- package/out/zero/src/zqlite.d.ts +2 -0
- package/out/zero/src/zqlite.d.ts.map +1 -0
- package/out/zero/src/zqlite.js +3 -0
- package/out/zero/src/zqlite.js.map +1 -0
- package/out/zero-cache/src/auth/write-authorizer.d.ts +4 -4
- package/out/zero-cache/src/auth/write-authorizer.d.ts.map +1 -1
- package/out/zero-cache/src/auth/write-authorizer.js +16 -13
- package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +4 -9
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/db/pg-copy.d.ts +1 -1
- package/out/zero-cache/src/db/pg-copy.d.ts.map +1 -1
- package/out/zero-cache/src/db/pg-copy.js +6 -7
- package/out/zero-cache/src/db/pg-copy.js.map +1 -1
- package/out/zero-cache/src/server/logging.d.ts +8 -3
- package/out/zero-cache/src/server/logging.d.ts.map +1 -1
- package/out/zero-cache/src/server/logging.js +2 -8
- package/out/zero-cache/src/server/logging.js.map +1 -1
- package/out/zero-cache/src/services/change-source/pg/copy-runner.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-source/pg/copy-runner.js +10 -3
- package/out/zero-cache/src/services/change-source/pg/copy-runner.js.map +1 -1
- package/out/zero-cache/src/services/litestream/commands.d.ts.map +1 -1
- package/out/zero-cache/src/services/litestream/commands.js +4 -11
- package/out/zero-cache/src/services/litestream/commands.js.map +1 -1
- package/out/zero-cache/src/services/litestream/config.yml +2 -0
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.js +5 -2
- package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
- package/out/zero-schema/src/builder/schema-builder.d.ts.map +1 -1
- package/out/zero-schema/src/builder/schema-builder.js +3 -0
- package/out/zero-schema/src/builder/schema-builder.js.map +1 -1
- package/out/zero.js +3 -3
- package/out/zql/src/builder/builder.d.ts.map +1 -1
- package/out/zql/src/builder/builder.js +14 -3
- package/out/zql/src/builder/builder.js.map +1 -1
- package/out/zql/src/query/query-impl.d.ts +1 -1
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +2 -2
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/out/zql/src/query/static-query.d.ts +2 -2
- package/out/zql/src/query/static-query.d.ts.map +1 -1
- package/out/zql/src/query/static-query.js +4 -4
- package/out/zql/src/query/static-query.js.map +1 -1
- package/out/zqlite/src/mod.d.ts +4 -0
- package/out/zqlite/src/mod.d.ts.map +1 -0
- package/out/zqlite/src/mod.js +4 -0
- package/out/zqlite/src/mod.js.map +1 -0
- package/out/zqlite/src/query-delegate.d.ts +25 -0
- package/out/zqlite/src/query-delegate.d.ts.map +1 -0
- package/out/zqlite/src/query-delegate.js +63 -0
- package/out/zqlite/src/query-delegate.js.map +1 -0
- package/package.json +5 -1
- package/out/chunk-Y5SC5VIM.js.map +0 -7
- package/out/inspector-VQFIQSJR.js.map +0 -7
- /package/out/{chunk-67DEDR65.js.map → chunk-JZAY4BJA.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
readonlyObject,
|
|
14
14
|
readonlyRecord,
|
|
15
15
|
valita_exports
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UAWIBMWA.js";
|
|
17
17
|
import {
|
|
18
18
|
assert,
|
|
19
19
|
assertArray,
|
|
@@ -2889,4 +2889,4 @@ export {
|
|
|
2889
2889
|
toPrimaryKeyString,
|
|
2890
2890
|
sourceNameFromKey
|
|
2891
2891
|
};
|
|
2892
|
-
//# sourceMappingURL=chunk-
|
|
2892
|
+
//# sourceMappingURL=chunk-JZAY4BJA.js.map
|
|
@@ -2770,7 +2770,7 @@ function buildPipelineInternal(ast, delegate, name, partitionKey) {
|
|
|
2770
2770
|
end = delegate.decorateInput(new Skip(end, ast.start), `${name}:skip)`);
|
|
2771
2771
|
}
|
|
2772
2772
|
for (const csq of csqsFromCondition) {
|
|
2773
|
-
end = applyCorrelatedSubQuery(csq, delegate, end, name);
|
|
2773
|
+
end = applyCorrelatedSubQuery(csq, delegate, end, name, true);
|
|
2774
2774
|
}
|
|
2775
2775
|
if (ast.where && !fullyAppliedFilters) {
|
|
2776
2776
|
end = applyWhere(end, ast.where, delegate, name);
|
|
@@ -2784,7 +2784,7 @@ function buildPipelineInternal(ast, delegate, name, partitionKey) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
if (ast.related) {
|
|
2786
2786
|
for (const csq of ast.related) {
|
|
2787
|
-
end = applyCorrelatedSubQuery(csq, delegate, end, name);
|
|
2787
|
+
end = applyCorrelatedSubQuery(csq, delegate, end, name, false);
|
|
2788
2788
|
}
|
|
2789
2789
|
}
|
|
2790
2790
|
return end;
|
|
@@ -2866,7 +2866,10 @@ function isNotAndDoesNotContainSubquery(condition) {
|
|
|
2866
2866
|
function applySimpleCondition(input, condition) {
|
|
2867
2867
|
return new Filter(input, createPredicate(condition));
|
|
2868
2868
|
}
|
|
2869
|
-
function applyCorrelatedSubQuery(sq, delegate, end, name) {
|
|
2869
|
+
function applyCorrelatedSubQuery(sq, delegate, end, name, fromCondition) {
|
|
2870
|
+
if (sq.subquery.limit === 0 && fromCondition) {
|
|
2871
|
+
return end;
|
|
2872
|
+
}
|
|
2870
2873
|
assert(sq.subquery.alias, "Subquery must have an alias");
|
|
2871
2874
|
const child = buildPipelineInternal(
|
|
2872
2875
|
sq.subquery,
|
|
@@ -2889,6 +2892,12 @@ function applyCorrelatedSubQuery(sq, delegate, end, name) {
|
|
|
2889
2892
|
}
|
|
2890
2893
|
function applyCorrelatedSubqueryCondition(input, condition, delegate, name) {
|
|
2891
2894
|
assert(condition.op === "EXISTS" || condition.op === "NOT EXISTS");
|
|
2895
|
+
if (condition.related.subquery.limit === 0) {
|
|
2896
|
+
if (condition.op === "EXISTS") {
|
|
2897
|
+
return new Filter(input, () => false);
|
|
2898
|
+
}
|
|
2899
|
+
return new Filter(input, () => true);
|
|
2900
|
+
}
|
|
2892
2901
|
const existsName = `${name}:exists(${condition.related.subquery.alias})`;
|
|
2893
2902
|
return delegate.decorateFilterInput(
|
|
2894
2903
|
new Exists(
|
|
@@ -3432,7 +3441,7 @@ var AbstractQuery = class {
|
|
|
3432
3441
|
destSchema,
|
|
3433
3442
|
{
|
|
3434
3443
|
table: destSchema,
|
|
3435
|
-
alias: `${SUBQ_PREFIX}${relationship}`
|
|
3444
|
+
alias: `${SUBQ_PREFIX}zhidden_${relationship}`
|
|
3436
3445
|
},
|
|
3437
3446
|
defaultFormat,
|
|
3438
3447
|
relationship
|
|
@@ -3516,7 +3525,7 @@ var completedAstSymbol = Symbol();
|
|
|
3516
3525
|
var QueryImpl = class _QueryImpl extends AbstractQuery {
|
|
3517
3526
|
#delegate;
|
|
3518
3527
|
#system;
|
|
3519
|
-
constructor(delegate, schema, tableName, ast, format, system = "client", currentJunction) {
|
|
3528
|
+
constructor(delegate, schema, tableName, ast = { table: tableName }, format = defaultFormat, system = "client", currentJunction) {
|
|
3520
3529
|
super(schema, tableName, ast, format, system, currentJunction);
|
|
3521
3530
|
this.#system = system;
|
|
3522
3531
|
this.#delegate = delegate;
|
|
@@ -3695,4 +3704,4 @@ export {
|
|
|
3695
3704
|
newQuerySymbol,
|
|
3696
3705
|
AbstractQuery
|
|
3697
3706
|
};
|
|
3698
|
-
//# sourceMappingURL=chunk-
|
|
3707
|
+
//# sourceMappingURL=chunk-UAWIBMWA.js.map
|