diff --git a/packages/zql/src/builder/builder.test.ts b/packages/zql/src/builder/builder.test.ts index 6cd6918a9..5e9f31d06 100644 --- a/packages/zql/src/builder/builder.test.ts +++ b/packages/zql/src/builder/builder.test.ts @@ -520,10 +520,15 @@ test('self-join', () => { }, "relationshipName": "recruiter", }, - "row": { - "id": 9, - "name": "abby", - "recruiterID": 8, + "node": { + "relationships": { + "recruiter": [], + }, + "row": { + "id": 9, + "name": "abby", + "recruiterID": 8, + }, }, "type": "child", }, @@ -564,10 +569,24 @@ test('self-join', () => { }, "relationshipName": "recruiter", }, - "row": { - "id": 9, - "name": "abby", - "recruiterID": 8, + "node": { + "relationships": { + "recruiter": [ + { + "relationships": {}, + "row": { + "id": 8, + "name": "sam", + "recruiterID": 3, + }, + }, + ], + }, + "row": { + "id": 9, + "name": "abby", + "recruiterID": 8, + }, }, "type": "child", }, @@ -887,10 +906,32 @@ test('multi-join', () => { }, "relationshipName": "userStates", }, - "row": { - "id": 2, - "name": "erik", - "recruiterID": 1, + "node": { + "relationships": { + "userStates": [ + { + "relationships": { + "states": [ + { + "relationships": {}, + "row": { + "code": "HI", + }, + }, + ], + }, + "row": { + "stateCode": "HI", + "userID": 2, + }, + }, + ], + }, + "row": { + "id": 2, + "name": "erik", + "recruiterID": 1, + }, }, "type": "child", }, @@ -1039,10 +1080,32 @@ test('join with limit', () => { }, "relationshipName": "userStates", }, - "row": { - "id": 2, - "name": "erik", - "recruiterID": 1, + "node": { + "relationships": { + "userStates": [ + { + "relationships": { + "states": [ + { + "relationships": {}, + "row": { + "code": "HI", + }, + }, + ], + }, + "row": { + "stateCode": "HI", + "userID": 2, + }, + }, + ], + }, + "row": { + "id": 2, + "name": "erik", + "recruiterID": 1, + }, }, "type": "child", }, diff --git a/packages/zql/src/ivm/catch.ts b/packages/zql/src/ivm/catch.ts index 34a962694..279ad30d4 100644 --- a/packages/zql/src/ivm/catch.ts +++ b/packages/zql/src/ivm/catch.ts @@ -21,7 +21,7 @@ export type CaughtRemoveChange = { export type CaughtChildChange = { type: 'child'; - row: Row; + node: CaughtNode; child: { relationshipName: string; change: CaughtChange; @@ -30,8 +30,8 @@ export type CaughtChildChange = { export type CaughtEditChange = { type: 'edit'; - oldRow: Row; - row: Row; + oldNode: CaughtNode; + node: CaughtNode; }; export type CaughtChange = @@ -85,13 +85,13 @@ export function expandChange(change: Change): CaughtChange { case 'edit': return { type: 'edit', - oldRow: change.oldNode.row, - row: change.node.row, + oldNode: expandNode(change.oldNode), + node: expandNode(change.node), }; case 'child': return { type: 'child', - row: change.node.row, + node: expandNode(change.node), child: { ...change.child, change: expandChange(change.child.change), diff --git a/packages/zql/src/ivm/fan-out-fan-in.test.ts b/packages/zql/src/ivm/fan-out-fan-in.test.ts index c2ab3f32e..cfe5be20c 100644 --- a/packages/zql/src/ivm/fan-out-fan-in.test.ts +++ b/packages/zql/src/ivm/fan-out-fan-in.test.ts @@ -46,13 +46,19 @@ test('fan-out pushes along all paths', () => { "type": "add", }, { - "oldRow": { - "a": 1, - "b": "foo", + "node": { + "relationships": {}, + "row": { + "a": 1, + "b": "bar", + }, }, - "row": { - "a": 1, - "b": "bar", + "oldNode": { + "relationships": {}, + "row": { + "a": 1, + "b": "foo", + }, }, "type": "edit", }, @@ -81,13 +87,19 @@ test('fan-out pushes along all paths', () => { "type": "add", }, { - "oldRow": { - "a": 1, - "b": "foo", + "node": { + "relationships": {}, + "row": { + "a": 1, + "b": "bar", + }, }, - "row": { - "a": 1, - "b": "bar", + "oldNode": { + "relationships": {}, + "row": { + "a": 1, + "b": "foo", + }, }, "type": "edit", }, @@ -116,13 +128,19 @@ test('fan-out pushes along all paths', () => { "type": "add", }, { - "oldRow": { - "a": 1, - "b": "foo", + "node": { + "relationships": {}, + "row": { + "a": 1, + "b": "bar", + }, }, - "row": { - "a": 1, - "b": "bar", + "oldNode": { + "relationships": {}, + "row": { + "a": 1, + "b": "foo", + }, }, "type": "edit", }, diff --git a/packages/zql/src/ivm/filter.test.ts b/packages/zql/src/ivm/filter.test.ts index 52ceb98c3..51419db7a 100644 --- a/packages/zql/src/ivm/filter.test.ts +++ b/packages/zql/src/ivm/filter.test.ts @@ -244,13 +244,19 @@ test('edit', () => { expect(out.pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "a": 2, - "x": 2, + "node": { + "relationships": {}, + "row": { + "a": 2, + "x": 4, + }, }, - "row": { - "a": 2, - "x": 4, + "oldNode": { + "relationships": {}, + "row": { + "a": 2, + "x": 2, + }, }, "type": "edit", }, diff --git a/packages/zql/src/ivm/join.sibling.test.ts b/packages/zql/src/ivm/join.sibling.test.ts index 18d70d3eb..9be8a1b8d 100644 --- a/packages/zql/src/ivm/join.sibling.test.ts +++ b/packages/zql/src/ivm/join.sibling.test.ts @@ -195,6 +195,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, }, ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i2", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i2", + }, + }, + 2, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o2", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o2", + }, + }, + 1, + ], [ "0", "fetchCount", @@ -234,9 +272,37 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, "relationshipName": "owners", }, - "row": { - "id": "i2", - "ownerId": "o2", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c3", + "issueId": "i2", + }, + }, + { + "relationships": {}, + "row": { + "id": "c4", + "issueId": "i2", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o2", + }, + }, + ], + }, + "row": { + "id": "i2", + "ownerId": "o2", + }, }, "type": "child", }, @@ -284,6 +350,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, }, ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i1", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i1", + }, + }, + 3, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o1", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o1", + }, + }, + 1, + ], [ "0", "fetchCount", @@ -324,9 +428,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, "relationshipName": "comments", }, - "row": { - "id": "i1", - "ownerId": "o1", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c1", + "issueId": "i1", + }, + }, + { + "relationships": {}, + "row": { + "id": "c2", + "issueId": "i1", + }, + }, + { + "relationships": {}, + "row": { + "id": "c5", + "issueId": "i1", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o1", + }, + }, + ], + }, + "row": { + "id": "i1", + "ownerId": "o1", + }, }, "type": "child", }, @@ -373,6 +512,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, }, ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i2", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i2", + }, + }, + 2, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o2", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o2", + }, + }, + 0, + ], [ "0", "fetchCount", @@ -412,9 +589,30 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, "relationshipName": "owners", }, - "row": { - "id": "i2", - "ownerId": "o2", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c3", + "issueId": "i2", + }, + }, + { + "relationships": {}, + "row": { + "id": "c4", + "issueId": "i2", + }, + }, + ], + "owners": [], + }, + "row": { + "id": "i2", + "ownerId": "o2", + }, }, "type": "child", }, @@ -462,6 +660,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, }, ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i2", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i2", + }, + }, + 1, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o2", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o2", + }, + }, + 1, + ], [ "0", "fetchCount", @@ -502,9 +738,30 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, "relationshipName": "comments", }, - "row": { - "id": "i2", - "ownerId": "o2", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c3", + "issueId": "i2", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o2", + }, + }, + ], + }, + "row": { + "id": "i2", + "ownerId": "o2", + }, }, "type": "child", }, @@ -581,6 +838,62 @@ suite('sibling relationships tests with issues, comments, and owners', () => { "type": "edit", }, ], + [ + "1", + "cleanup", + { + "constraint": { + "issueId": "i1", + }, + }, + ], + [ + "2", + "cleanup", + { + "constraint": { + "id": "o1", + }, + }, + ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i1", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i1", + }, + }, + 2, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o1", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o1", + }, + }, + 1, + ], ] `); expect(storage).toMatchInlineSnapshot(` @@ -598,15 +911,77 @@ suite('sibling relationships tests with issues, comments, and owners', () => { expect(output).toMatchInlineSnapshot(` [ { - "oldRow": { - "id": "i1", - "ownerId": "o1", - "text": "issue 1", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c1", + "issueId": "i1", + "text": "comment 1", + }, + }, + { + "relationships": {}, + "row": { + "id": "c2", + "issueId": "i1", + "text": "comment 2", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o1", + "text": "owner 1", + }, + }, + ], + }, + "row": { + "id": "i1", + "ownerId": "o1", + "text": "issue 1 changed", + }, }, - "row": { - "id": "i1", - "ownerId": "o1", - "text": "issue 1 changed", + "oldNode": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c1", + "issueId": "i1", + "text": "comment 1", + }, + }, + { + "relationships": {}, + "row": { + "id": "c2", + "issueId": "i1", + "text": "comment 2", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o1", + "text": "owner 1", + }, + }, + ], + }, + "row": { + "id": "i1", + "ownerId": "o1", + "text": "issue 1", + }, }, "type": "edit", }, @@ -656,6 +1031,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, }, ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i2", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i2", + }, + }, + 2, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o2", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o2", + }, + }, + 1, + ], [ "0", "fetchCount", @@ -685,24 +1098,61 @@ suite('sibling relationships tests with issues, comments, and owners', () => { { "child": { "change": { - "oldRow": { - "id": "c4", - "issueId": "i2", - "text": "comment 4", + "node": { + "relationships": {}, + "row": { + "id": "c4", + "issueId": "i2", + "text": "comment 4 changed", + }, }, - "row": { - "id": "c4", - "issueId": "i2", - "text": "comment 4 changed", + "oldNode": { + "relationships": {}, + "row": { + "id": "c4", + "issueId": "i2", + "text": "comment 4", + }, }, "type": "edit", }, "relationshipName": "comments", }, - "row": { - "id": "i2", - "ownerId": "o2", - "text": "issue 2", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c3", + "issueId": "i2", + "text": "comment 3", + }, + }, + { + "relationships": {}, + "row": { + "id": "c4", + "issueId": "i2", + "text": "comment 4 changed", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o2", + "text": "owner 2", + }, + }, + ], + }, + "row": { + "id": "i2", + "ownerId": "o2", + "text": "issue 2", + }, }, "type": "child", }, @@ -750,6 +1200,44 @@ suite('sibling relationships tests with issues, comments, and owners', () => { }, }, ], + [ + "1", + "fetch", + { + "constraint": { + "issueId": "i2", + }, + }, + ], + [ + "1", + "fetchCount", + { + "constraint": { + "issueId": "i2", + }, + }, + 2, + ], + [ + "2", + "fetch", + { + "constraint": { + "id": "o2", + }, + }, + ], + [ + "2", + "fetchCount", + { + "constraint": { + "id": "o2", + }, + }, + 1, + ], [ "0", "fetchCount", @@ -779,22 +1267,59 @@ suite('sibling relationships tests with issues, comments, and owners', () => { { "child": { "change": { - "oldRow": { - "id": "o2", - "text": "owner 2", + "node": { + "relationships": {}, + "row": { + "id": "o2", + "text": "owner 2 changed", + }, }, - "row": { - "id": "o2", - "text": "owner 2 changed", + "oldNode": { + "relationships": {}, + "row": { + "id": "o2", + "text": "owner 2", + }, }, "type": "edit", }, "relationshipName": "owners", }, - "row": { - "id": "i2", - "ownerId": "o2", - "text": "issue 2", + "node": { + "relationships": { + "comments": [ + { + "relationships": {}, + "row": { + "id": "c3", + "issueId": "i2", + "text": "comment 3", + }, + }, + { + "relationships": {}, + "row": { + "id": "c4", + "issueId": "i2", + "text": "comment 4", + }, + }, + ], + "owners": [ + { + "relationships": {}, + "row": { + "id": "o2", + "text": "owner 2 changed", + }, + }, + ], + }, + "row": { + "id": "i2", + "ownerId": "o2", + "text": "issue 2", + }, }, "type": "child", }, diff --git a/packages/zql/src/ivm/memory-source.test.ts b/packages/zql/src/ivm/memory-source.test.ts index e64210b47..d9c6ed0d5 100644 --- a/packages/zql/src/ivm/memory-source.test.ts +++ b/packages/zql/src/ivm/memory-source.test.ts @@ -132,15 +132,21 @@ test('push edit change', () => { expect(c.pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "a": "a", - "b": "b", - "c": "c", + "node": { + "relationships": {}, + "row": { + "a": "a", + "b": "b2", + "c": "c2", + }, }, - "row": { - "a": "a", - "b": "b2", - "c": "c2", + "oldNode": { + "relationships": {}, + "row": { + "a": "a", + "b": "b", + "c": "c", + }, }, "type": "edit", }, diff --git a/packages/zql/src/ivm/skip.test.ts b/packages/zql/src/ivm/skip.test.ts index 4f6b5fed3..d53eeab30 100644 --- a/packages/zql/src/ivm/skip.test.ts +++ b/packages/zql/src/ivm/skip.test.ts @@ -1155,15 +1155,21 @@ suite('push', () => { "type": "add", }, { - "oldRow": { - "date": "2014-01-24", - "id": 1, - "x": 1, + "node": { + "relationships": {}, + "row": { + "date": "2014-01-24", + "id": 1, + "x": 2, + }, }, - "row": { - "date": "2014-01-24", - "id": 1, - "x": 2, + "oldNode": { + "relationships": {}, + "row": { + "date": "2014-01-24", + "id": 1, + "x": 1, + }, }, "type": "edit", }, @@ -1213,13 +1219,19 @@ suite('push', () => { "type": "add", }, { - "oldRow": { - "date": "2014-01-25", - "id": 1, + "node": { + "relationships": {}, + "row": { + "date": "2014-01-26", + "id": 1, + }, }, - "row": { - "date": "2014-01-26", - "id": 1, + "oldNode": { + "relationships": {}, + "row": { + "date": "2014-01-25", + "id": 1, + }, }, "type": "edit", }, diff --git a/packages/zql/src/ivm/source.test.ts b/packages/zql/src/ivm/source.test.ts index 6b5ae98fc..d2e1bb0d7 100644 --- a/packages/zql/src/ivm/source.test.ts +++ b/packages/zql/src/ivm/source.test.ts @@ -2560,16 +2560,22 @@ test('json is a valid type to read and write to/from a source', () => { expect(out.pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "a": 4, - "j": { - "foo": "foo", + "node": { + "relationships": {}, + "row": { + "a": 4, + "j": { + "foo": "bar", + }, }, }, - "row": { - "a": 4, - "j": { - "foo": "bar", + "oldNode": { + "relationships": {}, + "row": { + "a": 4, + "j": { + "foo": "foo", + }, }, }, "type": "edit", diff --git a/packages/zql/src/ivm/take.push.test.ts b/packages/zql/src/ivm/take.push.test.ts index 892abfa5f..e42a92f71 100644 --- a/packages/zql/src/ivm/take.push.test.ts +++ b/packages/zql/src/ivm/take.push.test.ts @@ -1314,15 +1314,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 100, - "id": "i1", - "text": "a", + "node": { + "relationships": {}, + "row": { + "created": 100, + "id": "i1", + "text": "a2", + }, }, - "row": { - "created": 100, - "id": "i1", - "text": "a2", + "oldNode": { + "relationships": {}, + "row": { + "created": 100, + "id": "i1", + "text": "a", + }, }, "type": "edit", }, @@ -1383,15 +1389,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 400, - "id": "i4", - "text": "d", + "node": { + "relationships": {}, + "row": { + "created": 400, + "id": "i4", + "text": "d2", + }, }, - "row": { - "created": 400, - "id": "i4", - "text": "d2", + "oldNode": { + "relationships": {}, + "row": { + "created": 400, + "id": "i4", + "text": "d", + }, }, "type": "edit", }, @@ -1507,15 +1519,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 200, - "id": "i2", - "text": "b", + "node": { + "relationships": {}, + "row": { + "created": 200, + "id": "i2", + "text": "b2", + }, }, - "row": { - "created": 200, - "id": "i2", - "text": "b2", + "oldNode": { + "relationships": {}, + "row": { + "created": 200, + "id": "i2", + "text": "b", + }, }, "type": "edit", }, @@ -1576,15 +1594,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 300, - "id": "i3", - "text": "c", + "node": { + "relationships": {}, + "row": { + "created": 300, + "id": "i3", + "text": "c2", + }, }, - "row": { - "created": 300, - "id": "i3", - "text": "c2", + "oldNode": { + "relationships": {}, + "row": { + "created": 300, + "id": "i3", + "text": "c", + }, }, "type": "edit", }, @@ -1645,15 +1669,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 200, - "id": "i2", - "text": "b", + "node": { + "relationships": {}, + "row": { + "created": 50, + "id": "i2", + "text": "b2", + }, }, - "row": { - "created": 50, - "id": "i2", - "text": "b2", + "oldNode": { + "relationships": {}, + "row": { + "created": 200, + "id": "i2", + "text": "b", + }, }, "type": "edit", }, @@ -1823,15 +1853,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 200, - "id": "i2", - "text": "b", + "node": { + "relationships": {}, + "row": { + "created": 350, + "id": "i2", + "text": "b2", + }, }, - "row": { - "created": 350, - "id": "i2", - "text": "b2", + "oldNode": { + "relationships": {}, + "row": { + "created": 200, + "id": "i2", + "text": "b", + }, }, "type": "edit", }, @@ -1986,15 +2022,21 @@ suite('take with no partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 100, - "id": "i1", - "text": "a", + "node": { + "relationships": {}, + "row": { + "created": 50, + "id": "i1", + "text": "a2", + }, }, - "row": { - "created": 50, - "id": "i1", - "text": "a2", + "oldNode": { + "relationships": {}, + "row": { + "created": 100, + "id": "i1", + "text": "a", + }, }, "type": "edit", }, @@ -2650,17 +2692,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 100, - "id": "c1", - "issueID": "i1", - "text": "a", + "node": { + "relationships": {}, + "row": { + "created": 100, + "id": "c1", + "issueID": "i1", + "text": "a2", + }, }, - "row": { - "created": 100, - "id": "c1", - "issueID": "i1", - "text": "a2", + "oldNode": { + "relationships": {}, + "row": { + "created": 100, + "id": "c1", + "issueID": "i1", + "text": "a", + }, }, "type": "edit", }, @@ -2734,17 +2782,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 500, - "id": "c5", - "issueID": "i2", - "text": "e", + "node": { + "relationships": {}, + "row": { + "created": 500, + "id": "c5", + "issueID": "i2", + "text": "e2", + }, }, - "row": { - "created": 500, - "id": "c5", - "issueID": "i2", - "text": "e2", + "oldNode": { + "relationships": {}, + "row": { + "created": 500, + "id": "c5", + "issueID": "i2", + "text": "e", + }, }, "type": "edit", }, @@ -2886,17 +2940,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 200, - "id": "c2", - "issueID": "i1", - "text": "b", + "node": { + "relationships": {}, + "row": { + "created": 200, + "id": "c2", + "issueID": "i1", + "text": "b2", + }, }, - "row": { - "created": 200, - "id": "c2", - "issueID": "i1", - "text": "b2", + "oldNode": { + "relationships": {}, + "row": { + "created": 200, + "id": "c2", + "issueID": "i1", + "text": "b", + }, }, "type": "edit", }, @@ -2970,17 +3030,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 300, - "id": "c3", - "issueID": "i1", - "text": "c", + "node": { + "relationships": {}, + "row": { + "created": 300, + "id": "c3", + "issueID": "i1", + "text": "c2", + }, }, - "row": { - "created": 300, - "id": "c3", - "issueID": "i1", - "text": "c2", + "oldNode": { + "relationships": {}, + "row": { + "created": 300, + "id": "c3", + "issueID": "i1", + "text": "c", + }, }, "type": "edit", }, @@ -3073,17 +3139,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 300, - "id": "c3", - "issueID": "i1", - "text": "c", + "node": { + "relationships": {}, + "row": { + "created": 150, + "id": "c3", + "issueID": "i1", + "text": "c2", + }, }, - "row": { - "created": 150, - "id": "c3", - "issueID": "i1", - "text": "c2", + "oldNode": { + "relationships": {}, + "row": { + "created": 300, + "id": "c3", + "issueID": "i1", + "text": "c", + }, }, "type": "edit", }, @@ -3268,17 +3340,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 200, - "id": "c2", - "issueID": "i1", - "text": "b", + "node": { + "relationships": {}, + "row": { + "created": 50, + "id": "c2", + "issueID": "i1", + "text": "b2", + }, }, - "row": { - "created": 50, - "id": "c2", - "issueID": "i1", - "text": "b2", + "oldNode": { + "relationships": {}, + "row": { + "created": 200, + "id": "c2", + "issueID": "i1", + "text": "b", + }, }, "type": "edit", }, @@ -3482,17 +3560,23 @@ suite('take with partition', () => { expect(pushes).toMatchInlineSnapshot(` [ { - "oldRow": { - "created": 100, - "id": "c1", - "issueID": "i1", - "text": "a", + "node": { + "relationships": {}, + "row": { + "created": 250, + "id": "c1", + "issueID": "i1", + "text": "a2", + }, }, - "row": { - "created": 250, - "id": "c1", - "issueID": "i1", - "text": "a2", + "oldNode": { + "relationships": {}, + "row": { + "created": 100, + "id": "c1", + "issueID": "i1", + "text": "a", + }, }, "type": "edit", },