Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
aethr
· 1y ago · 0 comments
Using (from -> where -> select), how would you provide type hints on the where clause when your select includes non-table columns?
SELECT COUNT(col_a) as count WHERE count > 0
Kysely uses (from -> select -> where), and allows joins and selects in multiple places, like (from -> join -> select -> join -> select -> where).
Comments
[–]
valenterry
1y ago
Maybe I'm mistaken right now, but I think your query is invalid. You cannot refer to an select-alias (here "count") in a where-condition.