mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-07-22 23:18:02 +00:00
Aggregation
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user