1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-22 23:18:02 +00:00

Aggregation

This commit is contained in:
2023-02-18 15:41:53 +01:00
parent 715519b06d
commit 1b2315b0b0
14 changed files with 526 additions and 8 deletions

View File

@ -1,4 +1,8 @@
import { ObjectId } from 'bson';
import aggregationStages from './mongo-aggregation-stages.json';
import locales from './mongo-locales.json';
export { aggregationStages, locales };
// Calculate the min and max values of (un)signed integers with n bits
export const intMin = bits => Math.pow(2, bits - 1) * -1;
@ -32,3 +36,8 @@ export function canBeObjectId(value) {
return false;
}
}
export function aggregationStageDocumentationURL(stageName) {
const url = `https://www.mongodb.com/docs/manual/reference/operator/aggregation/${stageName.replace('$', '')}/`;
return url;
}