1.0.0 • Published 9 years ago

mynosql-query v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

mynosql-query

cli friendly one-line queries for mynosql.

Has about the same level of expressiveness as SQL where queries.

Example

var parse = require('mynosql-query')

var db = require('mynosql')(require('level')(pathToDb))

pull(
  db.query(parse('name=mynosql, version > 1.0.0')),
  pull.collect(console.log)
)

Syntax

<path><operator:value>+,...

path may be joined by dots and may contain wildcards.

foo.bar.baz or foo.*.baz.

operator:value is a an operator >,>=,<,<=,=,!= and a value (string or number) More than one range operator can be used. i.e. foo.bar > 10 < 5 read as (foo.bar is greater than 10 and smaller than 5)

To match multiple paths, join the parts of the query together with ,.

i.e. foo.bar > 10, baz=true

License

MIT