Skip to content

Commit

Permalink
fix: tokenize WHERE..IN check correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Sep 12, 2022
1 parent b573f45 commit dac348a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/database/tokenize.ts
Expand Up @@ -126,6 +126,12 @@ export function tokenizeCheck(check: Check, ctx: Query.Context) {
else if (right instanceof Check) {
tokens.push(tokenizeCheck(right, ctx))
}
// Array-based checks like "IN" actually use tuples.
else if (Array.isArray(right)) {
tokens.push({
tuple: right.map(value => tokenize(value, ctx)),
})
}
// Infer the type of any other values.
else {
tokens.push(tokenize(right, ctx))
Expand Down

0 comments on commit dac348a

Please sign in to comment.