Replies: 1 comment
-
You can use final each = yourTable.abcArr.jsonEach(this); Requiring that all elements are greater than one is equivalent to checking that none is smaller than that, which can be expressed with exist queries: final allGreaterThanOne = notExistsQuery(select(each)
..where((tbl) => tbl.value.cast<int>().isSmallerOrEqualValue(1))); Filtering rows having an element that is less than one is a direct exists query too: final atLeastOneIsLessThanOne = existsQuery(select(each)
..where((tbl) => tbl.value.cast<int>().isSmallerThanValue(1))); You can use these in the final query: select(yourTable)..where((_) => allGreaterThanOne) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The table has a field that is a json array, and the field name is abcArr.
Get the rows that satisfy the condition that all elements in the abcArr array are greater than 1,
and get the rows that satisfy the condition that at least one element in the abcArr array is less than 1.
Beta Was this translation helpful? Give feedback.
All reactions