0.14.0 • Published 1 year ago

@sidewinder/query v0.14.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Overview

This package provides a query expression syntax for constructing mongo filters from JavaScript like expressions.

import { Query } from '@sidewinder/query'

const Q = Query(`
    user_id === '6364ed67a7e953d089dbe23d' && (
        record.name === 'foo' ||
        record.desc === 'bar'
    )
`)

// const Q = {
//   "$and": [
//     {
//       "user_id": "6364ed67a7e953d089dbe23d"
//     },
//     {
//       "$or": [
//         {
//           "record.name": "foo"
//         },
//         {
//           "record.desc": "bar"
//         }
//       ]
//     }
//   ]
// }

const results = await collection.find(Q).toArray()
0.14.0

1 year ago

0.13.1

1 year ago

0.13.0

1 year ago

0.12.10

2 years ago

0.12.11

2 years ago

0.12.8

2 years ago

0.12.9

2 years ago

0.12.12

2 years ago

0.12.14

2 years ago

0.12.15

2 years ago

0.12.7

2 years ago

0.12.6

2 years ago

0.12.5

2 years ago

0.12.4

3 years ago

0.12.3

3 years ago

0.12.2

3 years ago

0.12.1

3 years ago

0.12.0

3 years ago

0.11.6

3 years ago

0.11.5

3 years ago

0.11.4

3 years ago

0.11.3

3 years ago

0.11.2

3 years ago

0.11.1

3 years ago

0.11.0

3 years ago

0.10.15

3 years ago