0.13.0 • Published 2 days ago

@sidewinder/query v0.13.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days 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.13.0

2 days ago

0.12.10

10 months ago

0.12.11

10 months ago

0.12.8

11 months ago

0.12.9

11 months ago

0.12.12

10 months ago

0.12.14

10 months ago

0.12.15

10 months ago

0.12.7

11 months ago

0.12.6

11 months ago

0.12.5

1 year ago

0.12.4

1 year ago

0.12.3

1 year ago

0.12.2

1 year ago

0.12.1

1 year ago

0.12.0

1 year ago

0.11.6

1 year ago

0.11.5

2 years ago

0.11.4

2 years ago

0.11.3

2 years ago

0.11.2

2 years ago

0.11.1

2 years ago

0.11.0

2 years ago

0.10.15

2 years ago