Replies: 1 comment 10 replies
-
Using direct variables as conditions doesn't make much sense as you've seen, since it applies the same value to every row - variables can only be bound to values, not to other SQL expressions. However, you can use components in queries - those can modify the actual SQL: @DriftDatabase(
tables: [Users],
queries: {
'userByCond': r'SELECT * FROM users WHERE $predicate LIMIT ?',
},
) This generates a |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need generate in dynamic variable conditions. I use next:
I need have :1 variable like String(it's generated in dynamic mode).
But in the *.g file I see Selectable userByCond(bool var1, int var2)
How to setup Var1 like String?
Beta Was this translation helpful? Give feedback.
All reactions