Created
August 18, 2022 21:17
-
-
Save gabrielpetersson/a2f2d2e195f43b7a87b0bccf53c1fa1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rows: any = []; | |
for (let i = 0; i < 14; i++) { | |
const [key, ordinal] = await Promise.all([ | |
extra.keyGenerator.nextKey(), | |
extra.ordinalGenerator.nextOrdinal(), | |
]); | |
rows.push({ | |
key, | |
values: [{ kind: "string", value: ordinal }], | |
}); | |
} | |
const insertRows: InsertRows = { | |
tableUuid, | |
columnMapping: [ordinalKeyColumnUuid], | |
rows, | |
}; | |
const updateRows: UpdateRows = { | |
tableUuid, | |
columnMapping: ["e60526d2-c063-456c-b8a6-233b82eeb0c4" as Uuid], | |
rows: [{ key: rows[0]!.key, values: [{ kind: "string", value: "hey" }] }], | |
}; | |
dispatch(searchSetIsOpen(false)); | |
dispatch(stagedOpLogSlice.actions.insertRows(insertRows)); | |
dispatch(stagedOpLogSlice.actions.updateRows(updateRows)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment