-
Notifications
You must be signed in to change notification settings - Fork 22
use db synced decimals, remove unused #2351
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: v3-canary
Are you sure you want to change the base?
Conversation
|
| const [dbPools, poolTokens] = await Promise.all([ | ||
| (await prisma.prismaPool.findMany({ | ||
| where: { chain, protocolVersion: 3, id: { in: changedIds } }, | ||
| select: { id: true, type: true, hook: true, typeData: true }, | ||
| })) as PoolWithMappedJsonFields[], | ||
| await prisma.prismaPoolToken.findMany({ | ||
| where: { chain, poolId: { in: changedIds } }, | ||
| include: { token: true }, | ||
| }), | ||
| ]); |
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.
can it be one query? just fetch pool tokens together with the pool using include?
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.
I thought you benchmarked this to be more efficient?
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.
and actually the way it is built right now with the PoolWithMappedJsonFields[] doenst easily allow for a single query
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.
I'll do a second pass over the whole sync at a later time
No description provided.