HigherFlyer
HigherFlyer
DTDrizzle Team
Created by HigherFlyer on 1/16/2024 in #help
Does orderBy guarantee evaluation order of where?
Given the example:
await db.query.posts.findMany({
orderBy: [asc(posts.id)],
where: <-- some logic that depends on knowing the post id -->
});
await db.query.posts.findMany({
orderBy: [asc(posts.id)],
where: <-- some logic that depends on knowing the post id -->
});
Would the where clause execute in the order specified by orderBy? This is important because my where logic depends on knowing the post id. If the where is executed in ascending order however, this is a non-issue.
15 replies