We are running into an issue where the getCursorQuery function seem to generate the appropriate query for 1 or 2 keys, but seem to generate a confusing query with 3 or more keys.
Here is an example with 3 columns.
SQL generated by the current getCursorQuery function
c1 > ? OR c1 = ? AND c2 > ? OR c1 = ? AND c2 = ? AND c3 > ?
As you can see, c3 is not taken in consideration in the first part of the query which gives us misleading results.
SQL that should have been generated
c1 >= ?
AND ( c1 > ? OR ( c2 >= ?
AND ( c2 > ? OR c3 > ? )
)
)
Hi @pilagod !
We are running into an issue where the
getCursorQuery
function seem to generate the appropriate query for 1 or 2 keys, but seem to generate a confusing query with 3 or more keys.Here is an example with 3 columns.
As you can see,
c3
is not taken in consideration in the first part of the query which gives us misleading results.What do you think?