Skip to content

Commit d89ebb8

Browse files
committed
wip(objectql): the packaged-dashboard-base double bounds find and is pinned in the engine-double ledger
Claude-Session: https://claude.ai/code/session_01DEvba2nBuD4tWzfq8r8NFY Co-authored-by: Claude <noreply@anthropic.com>
1 parent 494cdb4 commit d89ebb8

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎packages/objectql/src/protocol-packaged-dashboard-base.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ function makeSession() {
115115
if (table !== 'sys_metadata') return null;
116116
return rows.find((r) => matchesWhere(r, o.where)) ?? null;
117117
},
118-
async find(table: string, o: { where: Record<string, unknown> }) {
118+
async find(table: string, o: { where: Record<string, unknown>; limit?: number }) {
119119
if (table !== 'sys_metadata') return [];
120-
return rows.filter((r) => matchesWhere(r, o.where));
120+
const matched = rows.filter((r) => matchesWhere(r, o.where));
121+
// The caller's bound, applied after the filter, by presence.
122+
return typeof o?.limit === 'number' ? matched.slice(0, o.limit) : matched;
121123
},
122124
};
123125
const protocol: any = new ObjectStackProtocolImplementation(engine, undefined, 'env_test');

‎scripts/engine-double-contract.pinned.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,6 +2066,11 @@
20662066
"verb": "update",
20672067
"pinned": 1
20682068
},
2069+
{
2070+
"file": "packages/objectql/src/protocol-packaged-dashboard-base.test.ts",
2071+
"verb": "findOne",
2072+
"pinned": 1
2073+
},
20692074
{
20702075
"file": "packages/objectql/src/protocol-packaged-object-base.test.ts",
20712076
"verb": "delete",

0 commit comments

Comments
 (0)