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
Hi! We just changed from v1 to v2 and we started to face problems with our queries which use ternary operators. Are they supported at all? If we use them with numeric/named parameters then we get MixedParams error (escaping them will result syntax error, they appear as ? in queries). If we use them with positional params then we must escape ternary question mark with backslash. So it appears that ternary operator only works if we use them with positional params and escape character. It's kind of strange behavior and I couldn't find any info about that. Could you please clarify this problem: maybe we do something wrong and there's a change needed to be made when going from v1 to v2 in order to ternary operator to work?
P. S. question mark outside of scope of positional params and ternary operators (maybe in constant string) also kinda broken. It always considered as positional arg when not escaped and the only way to put it in query is to escape it, but then it will appear as escaped question mark.
The text was updated successfully, but these errors were encountered:
Hi! We just changed from v1 to v2 and we started to face problems with our queries which use ternary operators. Are they supported at all? If we use them with numeric/named parameters then we get MixedParams error (escaping them will result syntax error, they appear as ? in queries). If we use them with positional params then we must escape ternary question mark with backslash. So it appears that ternary operator only works if we use them with positional params and escape character. It's kind of strange behavior and I couldn't find any info about that. Could you please clarify this problem: maybe we do something wrong and there's a change needed to be made when going from v1 to v2 in order to ternary operator to work?
P. S. question mark outside of scope of positional params and ternary operators (maybe in constant string) also kinda broken. It always considered as positional arg when not escaped and the only way to put it in query is to escape it, but then it will appear as escaped question mark.
The text was updated successfully, but these errors were encountered: