mongo-bolt
Version:
A lightweight, beginner-friendly MongoDB wrapper with inbuilt caching and simplified joins/indexing.
23 lines (22 loc) • 427 B
JavaScript
export const operatorMap = {
// Match-related
greaterThan: "$gt",
lessThan: "$lt",
equal: "$eq",
notEqual: "$ne",
// Group-related
sum: "$sum",
avg: "$avg",
push: "$push",
first: "$first",
last: "$last",
// Project-related
concat: "$concat",
add: "$add",
subtract: "$subtract",
// Sort-related
asc: 1,
desc: -1,
// Entire doc
ENTIRE: "$$ROOT",
};