Skip to content

Add workaround to "only logical nots" limitation #33

New issue

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

Open
wants to merge 125 commits into
base: master
Choose a base branch
from

Conversation

vmx
Copy link
Member

@vmx vmx commented May 25, 2017

You cannot have every clause be negated as it's a very resource intensive
operation. Query need at least one non-negated clauses. There are two
workarounds:

  • Do a find {} and filter out the results in your application

  • Add a field that will always match and use it in your condition. Example:

    find {alwaystrue: == true && foo: !~= "bar"}

Add this information to the language reference and the repl-tests.

Fixes #28.

Damien Katz and others added 30 commits November 3, 2016 18:02
capnp should be specified to be installed, otherwise building fails with:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Failed, description: "Error while trying to execute `capnp compile`: Failed: No such file or directory (os error 2).  Please verify that version 0.5.2 or higher of the capnp executable is installed on your system. See https://capnproto.org/install.html" }', ../src/libcore/result.rs:788
note: Run with `RUST_BACKTRACE=1` for a backtrace.

```
TODO: finish the unit test
The plan is to get those changes upstream.
We now return the unstemmable characters in the prefix of a string as
there own stemmed word. and do not lowercase the suffix characters.
support for \\ \” \n \b \r \v \t \f which is similar to javascript
vmx and others added 28 commits April 20, 2017 20:40
This change doesn't change any functionality it's a pure refactoring.
The comparator was working on strings only, it now works with other
types like numbers, booleans and null as well.
It's now possible to do exact match queries on booleans
and null. Examples:

    find {A: ==true};
    find {A: ==false};
    find {A: ==null};
    find {boolarray: [==true]};
The order of running the repl tests shouldn't matter, hence it's a
good idea to not running them always in the same order. To make
things easier to debug, sort the tests by last modified date. If
you edit a test (which is likely if you debug it), it will run last.
So it's easy to see its output if there is any.
rustfmt is a tool that will modify rust source code to make it adhere
to a code formatting standard. It also has plugins for various popular
code editors to automatically format to those standards as you write
code. Using it ensures more uniform and readable source code.

It has been run here and where it could not automatically incorrectly
formatted code, I corrected those places manually.
This makes us consistent with other query languages. Plus I kept
finding myself wants to say order and ordering instead of sort. Seems
more intuitive.
Earlier changes in the cargo.toml file means the executable has a
different filename.
…work

Instead of early returning Ok(None) now correctly break out of loop and
parse single digits.
For comparison operators the term score should always be 1.
Instead of checking if the supplied key is a lexical prefix, check to
make sure it’s a keypath prefix.
Also changed syntax so that when specifying a return path with a `.`
there can be no whitespace between the `.` and the filename. subsequent
dots in the path and brackets, etc, still can have whitespace.

This change is because when a limit clause is after a `return .` the
limit keyword is interpreted as the field name.
Because sometimes you want to perform aggregations and ordering on all
documents. This will allow for that.
And publish to cargo.
Now to match on all docs, use `find {}`. When returning all of a field
of objects in an array, use foo[].bar
Moving out of node-noise project README.md
We forgot to do an early return for value fetch when count() is used.
It would instead load the whole document.
Otherwise you might run old code because you forgot to compile the
debug build.
Found an existing bug with logical not when testing this syntax change
out, it would match even when it shouldn’t because it would run off the
end of the array and assume it was a match.

Also the semantics are now if the field doesn’t exist at all in a
document, the != condition returns true.
You cannot have every clause be negated as it's a very resource intensive
operation. Query need at least one non-negated clauses. There are two
workarounds:

 - Do a `find {}` and filter out the results in your application
 - Add a field that will always match and use it in your condition. Example:

    find {alwaystrue: == true && foo: !~= "bar"}

Add this information to the language reference and the repl-tests.

Fixes pipedown#28.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants