gavioto / sqljet

Automatically exported from code.google.com/p/sqljet
0 stars 0 forks source link

Support < and > in addition to <= and >= in ISqlJetTable.scope(...) #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The ISqlJetTable scope method returns a cursor over a closed set (bounded by 
>=, <=), but does not support open sets (>, <).

This is not a significant problem for integer values since one can achieve > 
and < by simply adding or subtracting one to the bounds.  However for 
double-float values it is complicated to generate the next-highest or 
next-lowest values, and for string values even more so (the next string lower 
than "ABC" depends on the maximum string length and intimate knowledge of 
character encodings).

The lack of support for open sets makes it difficult to translate arbitrary 
SELECT + WHERE commands to SqlJet.

One possibility: a 2nd form of scope() that takes two additional boolean 
arguments, "boolean open_low, boolean open_high".  With both false, would be 
have like current scope().  With both true, would behave as ">, <".

Original issue reported on code.google.com by cdemarc...@gmail.com on 16 Mar 2011 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by sergey.s...@gmail.com on 16 Mar 2011 at 9:05

GoogleCodeExporter commented 9 years ago
I've fixed this issue in trunk at r971. Now you may use scopes with exclusive 
bounds with the help of the new SqlJetScope class and ISqlJetTable.scope(...) 
method that accept instance of SqlJetScope.

You may get binaries built from trunk from our build server at 
https://teamcity.svnkit.com/viewLog.html?buildId=13580&tab=artifacts&buildTypeId
=bt19

Fix will be merged back to 1.0.x branch in a few days.

Original comment by kit...@gmail.com on 22 Mar 2011 at 3:19

GoogleCodeExporter commented 9 years ago
Fix is now merged into 1.0.x branch.

Original comment by kit...@gmail.com on 23 Mar 2011 at 2:08