-
Notifications
You must be signed in to change notification settings - Fork 15
Model STs in Persistence #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
Another very important thing: We need to add the new tables to the PrismaDatabase's |
packages/persistance/src/services/prisma/mappers/StateTransitionMapper.ts
Outdated
Show resolved
Hide resolved
| DBStateTransitionBatch, | ||
| "txExecutionResultId" | "id" | "blockId" | "blockResultId" | ||
| >; | ||
| export type STBatchArrayMapOut2 = Omit<DBStateTransition, "batchId" | "id">[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, I like this pattern of re-defining the types that are derived from the Prisma types. I see that there are a lot of (by now too complicated) types that do this, can we extract them into those reusable defintions where it makes sense? Might make stuff more readable, especially at places where we stich them together
Instead of storing the STs and STBatches as json in a table, which makes them hard to query, we now create separate tables to store the information. This also requires changes to the mappers.