Cannot select expression
Closed this issue · 2 comments
phiresky commented
sql.select(sql.val(123))
The 'this' context of type 'typeof import(".../typed-sql")' is not assignable to method's 'this' of type 'SelectQuery<{}, {}, NoColumnsSelected>'.
Type 'typeof import(".../typed-sql")' is missing the following properties from type 'SelectQuery<{}, {}, NoColumnsSelected>': _orderBys, _havingCondition, _groupBys, getState, and 23 more.ts(2684)
phiresky commented
When importing select
directly, the error is
The 'this' context of type 'void' is not assignable to method's 'this' of type 'SelectQuery<{}, {}, NoColumnsSelected>'.ts(2684)
phiresky commented
Ok turns out the problem is just the location and text of the error message :/
sql.select(sql.val(123).as("tmp"))
works