We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When comparing numbers of different types, nitrite returns different results depending on the filter (eq, lte, gte) and if the value was indexed.
Here is a small example comparing int and long:
Nitrite db = Nitrite.builder().openOrCreate(); NitriteCollection collection = db.getCollection("myCollection"); Document doc = Document.createDocument("value", 42); collection.insert(doc); // assert collection.find(FluentFilter.where("value").eq(42L)).size() == 1; // FAIL assert collection.find(FluentFilter.where("value").lte(42L)).size() == 1; // SUCCESS assert collection.find(FluentFilter.where("value").gte(42L)).size() == 1; // SUCCESS collection.createIndex(IndexOptions.indexOptions(IndexType.NON_UNIQUE), "value"); // assert collection.find(FluentFilter.where("value").eq(42L)).size() == 1; // FAIL // assert collection.find(FluentFilter.where("value").lte(42L)).size() == 1; // FAIL // assert collection.find(FluentFilter.where("value").gte(42L)).size() == 1; // FAIL db.close();
This was tested with nitrite 4.3.0 and also shows the same results when comparing int and double.
The text was updated successfully, but these errors were encountered:
I'll take a look at it.
Sorry, something went wrong.
No branches or pull requests
When comparing numbers of different types, nitrite returns different results depending on the filter (eq, lte, gte) and if the value was indexed.
Here is a small example comparing int and long:
This was tested with nitrite 4.3.0 and also shows the same results when comparing int and double.
The text was updated successfully, but these errors were encountered: