@rocicorp/zero 0.20.2025051800 → 0.20.2025052000

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.
@@ -7271,17 +7271,18 @@ var MemorySource = class _MemorySource {
7271
7271
  assert(callingConnectionIndex !== -1, "Output not found");
7272
7272
  const conn = this.#connections[callingConnectionIndex];
7273
7273
  const { sort: requestedSort } = conn;
7274
- const indexSort = [];
7275
- if (req.constraint) {
7276
- for (const key of Object.keys(req.constraint)) {
7277
- indexSort.push([key, "asc"]);
7278
- }
7279
- }
7280
7274
  const pkConstraint = primaryKeyConstraintFromFilters(
7281
7275
  conn.filters?.condition,
7282
7276
  this.#primaryKey
7283
7277
  );
7284
- if (this.#primaryKey.length > 1 || !req.constraint || !constraintMatchesPrimaryKey(req.constraint, this.#primaryKey) && !pkConstraint) {
7278
+ const constraint = pkConstraint ?? req.constraint;
7279
+ const indexSort = [];
7280
+ if (constraint) {
7281
+ for (const key of Object.keys(constraint)) {
7282
+ indexSort.push([key, "asc"]);
7283
+ }
7284
+ }
7285
+ if (this.#primaryKey.length > 1 || !constraint || !constraintMatchesPrimaryKey(constraint, this.#primaryKey)) {
7285
7286
  indexSort.push(...requestedSort);
7286
7287
  }
7287
7288
  const index = this.#getOrCreateIndex(indexSort, from);
@@ -7289,7 +7290,6 @@ var MemorySource = class _MemorySource {
7289
7290
  const comparator2 = (r1, r2) => compare(r1, r2) * (req.reverse ? -1 : 1);
7290
7291
  const startAt = req.start?.row;
7291
7292
  let scanStart;
7292
- const constraint = pkConstraint ?? req.constraint;
7293
7293
  if (constraint) {
7294
7294
  scanStart = {};
7295
7295
  for (const [key, dir] of indexSort) {
@@ -7310,7 +7310,7 @@ var MemorySource = class _MemorySource {
7310
7310
  const withOverlay = generateWithOverlay(
7311
7311
  startAt,
7312
7312
  pkConstraint ? once(rowsIterable) : rowsIterable,
7313
- req.constraint,
7313
+ constraint,
7314
7314
  this.#overlay,
7315
7315
  this.#splitEditOverlay,
7316
7316
  callingConnectionIndex,
@@ -7319,7 +7319,7 @@ var MemorySource = class _MemorySource {
7319
7319
  );
7320
7320
  const withConstraint = generateWithConstraint(
7321
7321
  generateWithStart(withOverlay, req.start, comparator2),
7322
- req.constraint
7322
+ constraint
7323
7323
  );
7324
7324
  yield* conn.filters ? generateWithFilter(withConstraint, conn.filters.predicate) : withConstraint;
7325
7325
  }
@@ -8527,7 +8527,7 @@ function makeMessage(message, context, logLevel) {
8527
8527
  }
8528
8528
 
8529
8529
  // ../zero-client/src/client/version.ts
8530
- var version2 = "0.20.2025051800";
8530
+ var version2 = "0.20.2025052000";
8531
8531
 
8532
8532
  // ../zero-client/src/client/log-options.ts
8533
8533
  var LevelFilterLogSink = class {
@@ -11135,4 +11135,4 @@ export {
11135
11135
  update_needed_reason_type_enum_exports,
11136
11136
  Zero
11137
11137
  };
11138
- //# sourceMappingURL=chunk-5A5UEBK3.js.map
11138
+ //# sourceMappingURL=chunk-BOTUSRLW.js.map