Project changed name to squery from cmql, and is moving to squery.org,
until moving completed those still work
Java or Clojure programmers use squery-mongo-j
[org.cmql/cmql-core "0.2.0-SNAPSHOT"]
[org.cmql/cmql-j "0.2.0-SNAPSHOT"]
JS or Clojurescript programmers use squery-mongo-js
[org.cmql/cmql-core "0.2.0-SNAPSHOT"]
[org.cmql/cmql-js "0.2.0-SNAPSHOT"]
- query and data processing language for MongoDB
- up to 3x less code
- simple structure
- simple notation
Usage
- as tool to generate MQL usable from all drivers
- to call SQuery code directly from Java/NodeJS/Clojure/Clojurescript
(q (= :bedrooms 1)
(= :country.code "GR")
(group {:_id :stars}
{:average-price (avg :price)})
(sort :average-price)
(limit 1))
Generates
aggregate(
[{"$match":
{"$expr":
{"$and":
[{"$eq": ["$bedrooms", 1]},
{"$eq": ["$country.code", "GR"]}]}}},
{"$group": {"_id": "$stars",
"average-price": {"$avg": "$price"}}},
{"$sort": {"average-price": 1}},
{"$limit": 1}])
SQuery example apps
Java or Clojure programmers use squery-mongo-j
[org.squery/squery-mongo-core "0.2.0-SNAPSHOT"]
[org.squery/squery-mongo-j "0.2.0-SNAPSHOT"]
JS or Clojurescript programmers use squery-mongo-js
[org.squery/squery-mongo-core "0.2.0-SNAPSHOT"]
[org.squery/squery-mongo-js "0.2.0-SNAPSHOT"]
Copyright © 2020,2022 Takis Karyadis.
Distributed under the Eclipse Public License version 1.0.