You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT*FROM itemDownload
WHERE url LIKE :urlLike ESCAPE :escape AND itemId = :itemId AND channelId = :channelId;
SELECT*FROM itemDownload
WHERE url LIKE :urlLike AND itemId = :itemId AND channelId = :channelId;
Failing ANSI SQL
Description
Relates to sqlite ESCAPE gets wrong inferred type
Current PSI nodes:
0 = {SqlColumnExprImpl} "SqlColumnExprImpl(COLUMN_EXPR)
1 = {SqlBinaryLikeOperatorImpl} "SqlBinaryLikeOperatorImpl(BINARY_LIKE_OPERATOR)
2 = {SqlBindExprImpl} "SqlBindExprImpl(BIND_EXPR)
3 = {SqlBinaryAndExprImpl} "SqlBinaryAndExprImpl(BINARY_AND_EXPR) <-- BIND_EXPR :escape is child of this node
The desired tree would be
Proposed fix in
sql.bnf
grammarLIKE expr ESCAPE expr
is unusual as is similar to a function call LIKE(a, [ b ]) with optional argument of type TEXTCreate a new expr that can be assigned TEXT type in SqlDelight since there is no way to infer it
Move the precedence of binary_like_expr before bind_expr so that binary_like_expr nodes are children nodes of binary_and
The text was updated successfully, but these errors were encountered: