{"id":21522206,"url":"https://github.com/greguz/mql-match","last_synced_at":"2025-04-09T22:23:24.177Z","repository":{"id":57303682,"uuid":"364625514","full_name":"greguz/mql-match","owner":"greguz","description":"A MongoDB Query Language compiler.","archived":false,"fork":false,"pushed_at":"2024-08-07T11:59:46.000Z","size":267,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:19:49.573Z","etag":null,"topics":["compiler","mongo","mongodb","mql"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greguz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-05T15:36:27.000Z","updated_at":"2024-03-22T09:20:00.000Z","dependencies_parsed_at":"2024-08-23T00:10:38.492Z","dependency_job_id":"c386573f-9ddc-4772-af2e-607e517f6fa3","html_url":"https://github.com/greguz/mql-match","commit_stats":{"total_commits":65,"total_committers":1,"mean_commits":65.0,"dds":0.0,"last_synced_commit":"36d851b92e1822fec18081fff5470ef7c248b1f7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greguz%2Fmql-match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greguz%2Fmql-match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greguz%2Fmql-match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greguz%2Fmql-match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greguz","download_url":"https://codeload.github.com/greguz/mql-match/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120892,"owners_count":21051043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","mongo","mongodb","mql"],"created_at":"2024-11-24T01:09:35.604Z","updated_at":"2025-04-09T22:23:24.138Z","avatar_url":"https://github.com/greguz.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/greguz"],"categories":[],"sub_categories":[],"readme":"# mql-match\n\n[![NPM Version](https://img.shields.io/npm/v/mql-match)](https://www.npmjs.com/package/mql-match)\n[![NPM Dependency status](https://img.shields.io/librariesio/release/npm/mql-match)](https://www.npmjs.com/package/mql-match)\n[![NPM Downloads](https://img.shields.io/npm/dm/mql-match)](https://www.npmjs.com/package/mql-match)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![GitHub last commit](https://img.shields.io/github/last-commit/greguz/mql-match)](https://github.com/greguz/mql-match)\n\nThis project is a MQL (MongoDB Query Language) compiler. Filter, Update, and Aggregation queries are supported. See the [support table](#supported-features) table for more info.\n\n## Why\n\nThis project can be useful to mock some basic functionality of MongoDB's driver or simply using its query syntax for object matching.\n\n## Example\n\n```javascript\nimport { ObjectId } from 'bson' // or 'mongodb'\nimport {\n  compileAggregationExpression,\n  compileAggregationPipeline,\n  compileFilterQuery,\n  compileUpdateQuery\n} from 'mql-match'\n\nconst documents = [\n  {\n    _id: new ObjectId(\"507f1f77bcf86cd799439011\"),\n    value: 130\n  },\n  {\n    _id: new ObjectId(\"507f191e810c19729de860ea\"),\n    value: 42\n  }\n]\n\nconst match = compileFilterQuery({\n  _id: new ObjectId(\"507f1f77bcf86cd799439011\")\n})\n\n// logs { _id: new ObjectId(\"507f1f77bcf86cd799439011\"), value: 130 }\nconsole.log(documents.find(match))\n\nconst update = compileUpdateQuery({\n  $setOnInsert: {\n    hello: 'World'\n  },\n  $set: {\n    my: 'Pleasure'\n  }\n})\n\nconst oldObject = { _id: \"my_doc\" }\nupdate(oldObject)\n// logs { _id: 'my_doc', my: 'Pleasure' }\nconsole.log(oldObject)\n\nconst newObject = {}\n// the `true` say that this document was inserted\nupdate(newObject, true)\n// logs { _id: new ObjectId(\"xxxxxxxxxxxxxxxxxxxxxxxx\"), hello: 'World', my: 'Pleasure' }\nconsole.log(newObject)\n\nconst map = compileAggregationExpression({\n  _id: 0,\n  item: 1,\n  discount: {\n    $cond: {\n      if: { $gte: ['$qty', 250] },\n      then: 30,\n      else: 20\n    }\n  }\n})\n\n// logs { item: 'xyz1', discount: 30 }\nconsole.log(map({ _id: 3, item: 'xyz1', qty: 250 }))\n\n// Returns a function that accepts an iterable (both sync or async) and returns an async iterable\nconst aggregate = compileAggregationPipeline([\n  {\n    $match: {\n      value: 42\n    }\n  }\n])\n\nasync function pipelineExample () {\n  // logs { _id: new ObjectId(\"507f191e810c19729de860ea\"), value: 42 }\n  for await (const document of aggregate(documents)) {\n    console.log(document)\n  }\n}\n\npipelineExample().catch(err =\u003e console.error(err))\n```\n\n## Supported features\n\n### [Query Operators](https://docs.mongodb.com/manual/reference/operator/query/)\n\n#### Comparison\n\n- [x] [`$eq`](https://www.mongodb.com/docs/manual/reference/operator/query/eq/)\n- [x] [`$gt`](https://www.mongodb.com/docs/manual/reference/operator/query/gt/)\n- [x] [`$gte`](https://www.mongodb.com/docs/manual/reference/operator/query/gte/)\n- [x] [`$in`](https://www.mongodb.com/docs/manual/reference/operator/query/in/)\n- [x] [`$lt`](https://www.mongodb.com/docs/manual/reference/operator/query/lt/)\n- [x] [`$lte`](https://www.mongodb.com/docs/manual/reference/operator/query/lte/)\n- [x] [`$ne`](https://www.mongodb.com/docs/manual/reference/operator/query/ne/)\n- [x] [`$nin`](https://www.mongodb.com/docs/manual/reference/operator/query/nin/)\n\n#### Logical\n\n- [x] [`$and`](https://www.mongodb.com/docs/manual/reference/operator/query/and/)\n- [x] [`$not`](https://www.mongodb.com/docs/manual/reference/operator/query/not/)\n- [x] [`$nor`](https://www.mongodb.com/docs/manual/reference/operator/query/nor/)\n- [x] [`$or`](https://www.mongodb.com/docs/manual/reference/operator/query/or/)\n\n#### Element\n\n- [x] [`$exists`](https://www.mongodb.com/docs/manual/reference/operator/query/exists/)\n- [x] [`$type`](https://www.mongodb.com/docs/manual/reference/operator/query/type/)\n\n#### Evaluation\n\n- [x] [`$expr`](https://www.mongodb.com/docs/manual/reference/operator/query/expr/)\n- [ ] [`$jsonSchema`](https://www.mongodb.com/docs/manual/reference/operator/query/jsonSchema/)\n- [x] [`$mod`](https://www.mongodb.com/docs/manual/reference/operator/query/mod/)\n- [x] [`$regex`](https://www.mongodb.com/docs/manual/reference/operator/query/regex/)\n- [ ] [`$text`](https://www.mongodb.com/docs/manual/reference/operator/query/text/)\n- [ ] [`$where`](https://www.mongodb.com/docs/manual/reference/operator/query/where/)\n\n#### Geospatial\n\n- [ ] [`$geoIntersects`](https://www.mongodb.com/docs/manual/reference/operator/query/geoIntersects/)\n- [ ] [`$geoWithin`](https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/)\n- [ ] [`$near`](https://www.mongodb.com/docs/manual/reference/operator/query/near/)\n- [ ] [`$nearSphere`](https://www.mongodb.com/docs/manual/reference/operator/query/nearSphere/)\n\n#### Array\n\n- [x] [`$all`](https://www.mongodb.com/docs/manual/reference/operator/query/all/)\n- [x] [`$elemMatch`](https://www.mongodb.com/docs/manual/reference/operator/query/elemMatch/)\n- [x] [`$size`](https://www.mongodb.com/docs/manual/reference/operator/query/size/)\n\n#### Bitwise\n\n- [ ] [`$bitsAllClear`](https://www.mongodb.com/docs/manual/reference/operator/query/bitsAllClear/)\n- [ ] [`$bitsAllSet`](https://www.mongodb.com/docs/manual/reference/operator/query/bitsAllSet/)\n- [ ] [`$bitsAnyClear`](https://www.mongodb.com/docs/manual/reference/operator/query/bitsAnyClear/)\n- [ ] [`$bitsAnySet`](https://www.mongodb.com/docs/manual/reference/operator/query/bitsAnySet/)\n\n#### Projection\n\n- [ ] [`$`](https://www.mongodb.com/docs/manual/reference/operator/projection/positional/)\n- [ ] [`$elemMatch`](https://www.mongodb.com/docs/manual/reference/operator/projection/elemMatch/)\n- [ ] [`$meta`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/meta/)\n- [ ] [`$slice`](https://www.mongodb.com/docs/manual/reference/operator/projection/slice/)\n\n#### Miscellaneous\n\n- [x] [`$comment`](https://www.mongodb.com/docs/manual/reference/operator/query/comment/) Stub.\n- [ ] [`$rand`](https://www.mongodb.com/docs/manual/reference/operator/query/rand/)\n\n### [Update Operators](https://www.mongodb.com/docs/manual/reference/operator/update/)\n\n#### Fields\n\n- [x] [`$currentDate`](https://www.mongodb.com/docs/manual/reference/operator/update/currentDate/)\n- [x] [`$inc`](https://www.mongodb.com/docs/manual/reference/operator/update/inc/)\n- [x] [`$min`](https://www.mongodb.com/docs/manual/reference/operator/update/min/)\n- [x] [`$max`](https://www.mongodb.com/docs/manual/reference/operator/update/max/)\n- [x] [`$mul`](https://www.mongodb.com/docs/manual/reference/operator/update/mul/)\n- [x] [`$rename`](https://www.mongodb.com/docs/manual/reference/operator/update/rename/)\n- [x] [`$set`](https://www.mongodb.com/docs/manual/reference/operator/update/set/)\n- [x] [`$setOnInsert`](https://www.mongodb.com/docs/manual/reference/operator/update/setOnInsert/)\n- [x] [`$unset`](https://www.mongodb.com/docs/manual/reference/operator/update/unset/)\n\n#### Array\n\n- [ ] [`$`](https://www.mongodb.com/docs/manual/reference/operator/update/positional/)\n- [ ] [`$[]`](https://www.mongodb.com/docs/manual/reference/operator/update/positional-all/)\n- [ ] [`$[\u003cidentifier\u003e]`](https://www.mongodb.com/docs/manual/reference/operator/update/positional-filtered/)\n- [x] [`$addToSet`](https://www.mongodb.com/docs/manual/reference/operator/update/addToSet/)\n- [x] [`$pop`](https://www.mongodb.com/docs/manual/reference/operator/update/pop/)\n- [x] [`$pull`](https://www.mongodb.com/docs/manual/reference/operator/update/pull/)\n- [x] [`$push`](https://www.mongodb.com/docs/manual/reference/operator/update/push/)\n- [x] [`$pullAll`](https://www.mongodb.com/docs/manual/reference/operator/update/pullAll/)\n\n#### Modifiers\n\n- [x] [`$each`](https://www.mongodb.com/docs/manual/reference/operator/update/each/)\n- [x] [`$position`](https://www.mongodb.com/docs/manual/reference/operator/update/position/)\n- [x] [`$slice`](https://www.mongodb.com/docs/manual/reference/operator/update/slice/)\n- [x] [`$sort`](https://www.mongodb.com/docs/manual/reference/operator/update/sort/) Limited to a single field.\n\n#### Bitwise\n\n- [ ] [`$bit`](https://www.mongodb.com/docs/manual/reference/operator/update/bit/)\n\n### [Aggregation Pipeline Stages](https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/#alphabetical-listing-of-stages)\n\n- [x] [`$addFields`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/addFields/)\n- [ ] [`$bucket`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucket/)\n- [ ] [`$bucketAuto`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucketAuto/)\n- [ ] [`$changeStream`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/changeStream/)\n- [ ] [`$collStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats/)\n- [x] [`$count`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/count/)\n- [ ] [`$currentOp`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/currentOp/)\n- [ ] [`$densify`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/densify/)\n- [ ] [`$documents`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/documents/)\n- [ ] [`$facet`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/facet/)\n- [ ] [`$fill`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/fill/)\n- [ ] [`$geoNear`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/geoNear/)\n- [ ] [`$graphLookup`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/graphLookup/)\n- [ ] [`$group`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/)\n- [ ] [`$indexStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/indexStats/)\n- [x] [`$limit`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/limit/)\n- [ ] [`$listLocalSessions`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listLocalSessions/)\n- [ ] [`$listSessions`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listSessions/)\n- [ ] [`$lookup`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lookup/)\n- [x] [`$match`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match/)\n- [ ] [`$merge`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/merge/)\n- [ ] [`$out`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/out/)\n- [ ] [`$planCacheStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/planCacheStats/)\n- [x] [`$project`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/)\n- [ ] [`$redact`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/redact/)\n- [ ] [`$replaceRoot`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/replaceRoot/)\n- [ ] [`$replaceWith`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/replaceWith/)\n- [ ] [`$sample`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sample/)\n- [ ] [`$search`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/search/)\n- [ ] [`$searchMeta`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/searchMeta/)\n- [x] [`$set`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/set/)\n- [ ] [`$setWindowFields`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setWindowFields/)\n- [x] [`$skip`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/skip/)\n- [x] [`$sort`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/)\n- [ ] [`$sortByCount`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sortByCount/)\n- [ ] [`$unionWith`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/unionWith/)\n- [x] [`$unset`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/unset/)\n- [x] [`$unwind`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/unwind/)\n\n### [Aggregation Variables](https://www.mongodb.com/docs/manual/reference/aggregation-variables/)\n\n- [x] `$$NOW`\n- [x] `$$CLUSTER_TIME`\n- [x] `$$ROOT`\n- [ ] `$$CURRENT`\n- [ ] `$$REMOVE`\n- [ ] `$$DESCEND`\n- [ ] `$$PRUNE`\n\n### [Aggregation Pipeline Operators](https://www.mongodb.com/docs/manual/reference/operator/aggregation/)\n\nOperators not listed here are currently not supported. Feel free to open an [GitHub Issue](https://github.com/greguz/mql-match/issues/new) if you need something in particular.\n\n#### Arithmetic Expression Operators\n\n- [x] [`$abs`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/abs/)\n- [x] [`$add`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/add/)\n- [x] [`$ceil`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/ceil/)\n- [x] [`$divide`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/divide/)\n- [x] [`$exp`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/exp/)\n- [x] [`$floor`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/floor/)\n- [x] [`$ln`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/ln/)\n- [x] [`$log`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/log/)\n- [x] [`$log10`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/log10/)\n- [x] [`$mod`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/mod/)\n- [x] [`$multiply`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/multiply/)\n- [x] [`$pow`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/pow/)\n- [x] [`$round`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/round/)\n- [x] [`$sqrt`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sqrt/)\n- [x] [`$subtract`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/subtract/)\n- [x] [`$trunc`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/trunc/)\n\n#### Array Expression Operators\n\n- [ ] [`$arrayElemAt`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/arrayElemAt/)\n- [ ] [`$arrayToObject`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/arrayToObject/)\n- [x] [`$concatArrays`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/concatArrays/)\n- [ ] [`$filter`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/filter/)\n- [ ] [`$first`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/first/)\n- [ ] [`$firstN`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/firstN/)\n- [x] [`$in`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/in/)\n- [ ] [`$indexOfArray`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/indexOfArray/)\n- [x] [`$isArray`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/isArray/)\n- [ ] [`$last`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/last/)\n- [ ] [`$lastN`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lastN/)\n- [ ] [`$map`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/map/)\n- [ ] [`$maxN`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/maxN/)\n- [ ] [`$minN`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/minN/)\n- [ ] [`$objectToArray`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/objectToArray/)\n- [ ] [`$range`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/range/)\n- [ ] [`$reduce`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/reduce/)\n- [ ] [`$reverseArray`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/reverseArray/)\n- [x] [`$size`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/size/)\n- [ ] [`$slice`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/slice/)\n- [ ] [`$sortArray`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sortArray/)\n- [ ] [`$zip`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/zip/)\n\n#### Boolean Expression Operators\n\n- [x] [`$and`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/and/)\n- [x] [`$not`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/not/)\n- [x] [`$or`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/or/)\n\n#### Comparison Expression Operators\n\n- [x] [`$cmp`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/cmp/)\n- [x] [`$eq`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/eq/)\n- [x] [`$gt`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/gt/)\n- [x] [`$gte`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/gte/)\n- [x] [`$lt`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lt/)\n- [x] [`$lte`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lte/)\n- [x] [`$ne`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/ne/)\n\n#### Conditional Expression Operators\n\n- [x] [`$cond`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/cond/)\n- [x] [`$ifNull`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/ifNull/)\n- [x] [`$switch`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/switch/)\n\n#### Custom Aggregation Expression Operators\n\n- [ ] [`$accumulator`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/accumulator/)\n- [ ] [`$function`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/function/)\n\n#### Data Size Operators\n\n- [ ] [`$binarySize`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/binarySize/)\n- [ ] [`$bsonSize`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bsonSize/)\n\n#### Date Expression Operators\n\n- [ ] [`$dateAdd`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateAdd/)\n- [ ] [`$dateDiff`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateDiff/)\n- [ ] [`$dateFromParts`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateFromParts/)\n- [ ] [`$dateFromString`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateFromString/)\n- [ ] [`$dateSubtract`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateSubtract/)\n- [ ] [`$dateToParts`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateToParts/)\n- [ ] [`$dateToString`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateToString/)\n- [ ] [`$dateTrunc`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateTrunc/)\n- [ ] [`$dayOfMonth`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dayOfMonth/)\n- [ ] [`$dayOfWeek`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dayOfWeek/)\n- [ ] [`$dayOfYear`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dayOfYear/)\n- [ ] [`$hour`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/hour/)\n- [ ] [`$isoDayOfWeek`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/isoDayOfWeek/)\n- [ ] [`$isoWeek`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/isoWeek/)\n- [ ] [`$isoWeekYear`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/isoWeekYear/)\n- [ ] [`$millisecond`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/millisecond/)\n- [ ] [`$minute`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/minute/)\n- [ ] [`$month`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/month/)\n- [ ] [`$second`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/second/)\n- [ ] [`$toDate`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toDate/)\n- [ ] [`$week`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/week/)\n- [ ] [`$year`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/year/)\n\n#### Literal Expression Operator\n\n- [x] [`$literal`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/literal/) No validation.\n\n#### Miscellaneous Operators\n\n- [ ] [`$getField`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/getField/)\n- [ ] [`$rand`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/rand/)\n- [ ] [`$sampleRate`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sampleRate/)\n\n#### Object Expression Operators\n\n- [ ] [`$mergeObjects`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/mergeObjects/)\n- [ ] [`$objectToArray`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/objectToArray/)\n- [ ] [`$setField`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setField/)\n\n#### Set Expression Operators\n\n- [ ] [`$allElementsTrue`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/allElementsTrue/)\n- [ ] [`$anyElementTrue`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/anyElementTrue/)\n- [ ] [`$setDifference`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setDifference/)\n- [ ] [`$setEquals`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setEquals/)\n- [ ] [`$setIntersection`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setIntersection/)\n- [ ] [`$setIsSubset`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setIsSubset/)\n- [ ] [`$setUnion`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setUnion/)\n\n#### String Expression Operators\n\n- [ ] [`$concat`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/concat/)\n- [ ] [`$dateFromString`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateFromString/)\n- [ ] [`$dateToString`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/dateToString/)\n- [ ] [`$indexOfBytes`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/indexOfBytes/)\n- [ ] [`$indexOfCP`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/indexOfCP/)\n- [ ] [`$ltrim`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/ltrim/)\n- [ ] [`$regexFind`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexFind/)\n- [ ] [`$regexFindAll`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexFindAll/)\n- [ ] [`$regexMatch`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexMatch/)\n- [ ] [`$replaceOne`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/replaceOne/)\n- [ ] [`$replaceAll`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/replaceAll/)\n- [ ] [`$rtrim`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/rtrim/)\n- [ ] [`$split`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/split/)\n- [ ] [`$strLenBytes`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/strLenBytes/)\n- [ ] [`$strLenCP`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/strLenCP/)\n- [ ] [`$strcasecmp`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/strcasecmp/)\n- [ ] [`$substr`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/substr/)\n- [ ] [`$substrBytes`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/substrBytes/)\n- [ ] [`$substrCP`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/substrCP/)\n- [ ] [`$toLower`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toLower/)\n- [ ] [`$toString`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toString/)\n- [ ] [`$trim`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/trim/)\n- [ ] [`$toUpper`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toUpper/)\n\n#### Text Expression Operator\n\n- [ ] [`$meta`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/meta/)\n\n#### Timestamp Expression Operators\n\n- [ ] [`$tsIncrement`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/tsIncrement/)\n- [ ] [`$tsSecond`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/tsSecond/)\n\n#### Trigonometry Expression Operators\n\n- [ ] [`$sin`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sin/)\n- [ ] [`$cos`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/cos/)\n- [ ] [`$tan`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/tan/)\n- [ ] [`$asin`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/asin/)\n- [ ] [`$acos`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/acos/)\n- [ ] [`$atan`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/atan/)\n- [ ] [`$atan2`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/atan2/)\n- [ ] [`$asinh`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/asinh/)\n- [ ] [`$acosh`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/acosh/)\n- [ ] [`$atanh`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/atanh/)\n- [ ] [`$sinh`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/sinh/)\n- [ ] [`$cosh`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/cosh/)\n- [ ] [`$tanh`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/tanh/)\n- [ ] [`$degreesToRadians`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/degreesToRadians/)\n- [ ] [`$radiansToDegrees`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/radiansToDegrees/)\n\n#### Type Expression Operators\n\n- [x] [`$convert`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/convert/)\n- [x] [`$isNumber`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/isNumber/)\n- [x] [`$toBool`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toBool/)\n- [ ] [`$toDate`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toDate/)\n- [ ] [`$toDecimal`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toDecimal/)\n- [x] [`$toDouble`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toDouble/)\n- [ ] [`$toInt`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toInt/)\n- [ ] [`$toLong`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toLong/)\n- [x] [`$toObjectId`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toObjectId/)\n- [x] [`$toString`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toString/)\n- [x] [`$type`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/type/) Adds `\"unknown\"` type.\n\n## Support\n\nIf this library helps you in your organization, you can show some love by giving the repo a star or support by making a nominal monetary contribution.\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/greguz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreguz%2Fmql-match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreguz%2Fmql-match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreguz%2Fmql-match/lists"}