mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-07-19 22:18:03 +00:00
Aggregation
This commit is contained in:
41
frontend/src/lib/mongo-aggregation-stages.json
Normal file
41
frontend/src/lib/mongo-aggregation-stages.json
Normal file
@ -0,0 +1,41 @@
|
||||
[
|
||||
"$addFields",
|
||||
"$bucket",
|
||||
"$bucketAuto",
|
||||
"$changeStream",
|
||||
"$collStats",
|
||||
"$count",
|
||||
"$currentOp",
|
||||
"$densify",
|
||||
"$documents",
|
||||
"$facet",
|
||||
"$fill",
|
||||
"$geoNear",
|
||||
"$graphLookup",
|
||||
"$group",
|
||||
"$indexStats",
|
||||
"$limit",
|
||||
"$listLocalSessions",
|
||||
"$listSessions",
|
||||
"$lookup",
|
||||
"$match",
|
||||
"$merge",
|
||||
"$out",
|
||||
"$planCacheStats",
|
||||
"$project",
|
||||
"$redact",
|
||||
"$replaceRoot",
|
||||
"$replaceWith",
|
||||
"$sample",
|
||||
"$search",
|
||||
"$searchMeta",
|
||||
"$set",
|
||||
"$setWindowFields",
|
||||
"$shardedDataDistribution",
|
||||
"$skip",
|
||||
"$sort",
|
||||
"$sortByCount",
|
||||
"$unionWith",
|
||||
"$unset",
|
||||
"$unwind"
|
||||
]
|
152
frontend/src/lib/mongo-locales.json
Normal file
152
frontend/src/lib/mongo-locales.json
Normal file
@ -0,0 +1,152 @@
|
||||
{
|
||||
"af": "Afrikaans",
|
||||
"sq": "Albanian",
|
||||
"am": "Amharic",
|
||||
"ar": "Arabic",
|
||||
"ar@collation=compat": "Arabic",
|
||||
"hy": "Armenian",
|
||||
"as": "Assamese",
|
||||
"az": "Azeri",
|
||||
"az@collation=search": "Azeri",
|
||||
"be": "Belarusian",
|
||||
"bn": "Bengali",
|
||||
"bn@collation=traditional": "Bengali",
|
||||
"bs": "Bosnian",
|
||||
"bs@collation=search": "Bosnian",
|
||||
"bs_Cyrl": "Bosnian (Cyrillic)",
|
||||
"bg": "Bulgarian",
|
||||
"my": "Burmese",
|
||||
"ca": "Catalan",
|
||||
"ca@collation=search": "Catalan",
|
||||
"chr": "Cherokee",
|
||||
"zh": "Chinese",
|
||||
"zh@collation=big5han": "Chinese",
|
||||
"zh@collation=gb2312han": "Chinese",
|
||||
"zh@collation=unihan": "Chinese",
|
||||
"zh@collation=zhuyin": "Chinese",
|
||||
"zh_Hant": "Chinese (Traditional)",
|
||||
"hr": "Croatian",
|
||||
"hr@collation=search": "Croatian",
|
||||
"cs": "Czech",
|
||||
"cs@collation=search": "Czech",
|
||||
"da": "Danish",
|
||||
"da@collation=search": "Danish",
|
||||
"nl": "Dutch",
|
||||
"dz": "Dzongkha",
|
||||
"en": "English",
|
||||
"en_US": "English (United States)",
|
||||
"en_US_POSIX": "English (United States, Computer)",
|
||||
"eo": "Esperanto",
|
||||
"et": "Estonian",
|
||||
"ee": "Ewe",
|
||||
"fo": "Faroese",
|
||||
"fil": "Filipino",
|
||||
"fi": "Finnish",
|
||||
"fi@collation=search": "Finnish",
|
||||
"fi@collation=traditional": "Finnish",
|
||||
"fr": "French",
|
||||
"fr_CA": "French (Canada)",
|
||||
"gl": "Galician",
|
||||
"gl@collation=search": "Galician",
|
||||
"ka": "Georgian",
|
||||
"de": "German",
|
||||
"de@collation=eor": "German",
|
||||
"de@collation=phonebook": "German",
|
||||
"de@collation=search": "German",
|
||||
"de_AT": "German (Austria)",
|
||||
"de_AT@collation=phonebook": "German (Austria)",
|
||||
"el": "Greek",
|
||||
"gu": "Gujarati",
|
||||
"ha": "Hausa",
|
||||
"haw": "Hawaiian",
|
||||
"he": "Hebrew",
|
||||
"he@collation=search": "Hebrew",
|
||||
"hi": "Hindi",
|
||||
"hu": "Hungarian",
|
||||
"is": "Icelandic",
|
||||
"is@collation=search": "Icelandic",
|
||||
"ig": "Igbo",
|
||||
"smn": "Inari Sami",
|
||||
"smn@collation=search": "Inari Sami",
|
||||
"id": "Indonesian",
|
||||
"ga": "Irish",
|
||||
"it": "Italian",
|
||||
"ja": "Japanese",
|
||||
"ja@collation=unihan": "Japanese",
|
||||
"kl": "Kalaallisut",
|
||||
"kl@collation=search": "Kalaallisut",
|
||||
"kn": "Kannada",
|
||||
"kn@collation=traditional": "Kannada",
|
||||
"kk": "Kazakh",
|
||||
"km": "Khmer",
|
||||
"kok": "Konkani",
|
||||
"ko": "Korean",
|
||||
"ko@collation=search": "Korean",
|
||||
"ko@collation=searchjl": "Korean",
|
||||
"ko@collation=unihan": "Korean",
|
||||
"ky": "Kyrgyz",
|
||||
"lkt": "Lakota",
|
||||
"lo": "Lao",
|
||||
"lv": "Latvian",
|
||||
"ln": "Lingala",
|
||||
"ln@collation=phonetic": "Lingala",
|
||||
"lt": "Lithuanian",
|
||||
"dsb": "Lower Sorbian",
|
||||
"lb": "Luxembourgish",
|
||||
"mk": "Macedonian",
|
||||
"ms": "Malay",
|
||||
"ml": "Malayalam",
|
||||
"mt": "Maltese",
|
||||
"mr": "Marathi",
|
||||
"mn": "Mongolian",
|
||||
"ne": "Nepali",
|
||||
"se": "Northern Sami",
|
||||
"se@collation=search": "Northern Sami",
|
||||
"nb": "Norwegian Bokmål",
|
||||
"nb@collation=search": "Norwegian Bokmål",
|
||||
"nn": "Norwegian Nynorsk",
|
||||
"nn@collation=search": "Norwegian Nynorsk",
|
||||
"or": "Oriya",
|
||||
"om": "Oromo",
|
||||
"ps": "Pashto",
|
||||
"fa": "Persian",
|
||||
"fa_AF": "Persian (Afghanistan)",
|
||||
"pl": "Polish",
|
||||
"pt": "Portuguese",
|
||||
"pa": "Punjabi",
|
||||
"ro": "Romanian",
|
||||
"ru": "Russian",
|
||||
"sr": "Serbian",
|
||||
"sr_Latn": "Serbian (Latin)",
|
||||
"sr_Latn@collation=search": "Serbian (Latin)",
|
||||
"si": "Sinhala",
|
||||
"si@collation=dictionary": "Sinhala",
|
||||
"sk": "Slovak",
|
||||
"sk@collation=search": "Slovak",
|
||||
"sl": "Slovenian",
|
||||
"es": "Spanish",
|
||||
"es@collation=traditional": "Spanish",
|
||||
"es@collation=search": "Spanish",
|
||||
"sw": "Swahili",
|
||||
"sv": "Swedish",
|
||||
"sv@collation=search": "Swedish",
|
||||
"ta": "Tamil",
|
||||
"te": "Telugu",
|
||||
"th": "Thai",
|
||||
"bo": "Tibetan",
|
||||
"to": "Tongan",
|
||||
"tr": "Turkish",
|
||||
"tr@collation=search": "Turkish",
|
||||
"uk": "Ukrainian",
|
||||
"hsb": "Upper Sorbian",
|
||||
"ur": "Urdu",
|
||||
"ug": "Uyghur",
|
||||
"vi": "Vietnamese",
|
||||
"vi@collation=traditional": "Vietnamese",
|
||||
"wae": "Walser",
|
||||
"cy": "Welsh",
|
||||
"yi": "Yiddish",
|
||||
"yi@collation=search": "Yiddish",
|
||||
"yo": "Yoruba",
|
||||
"zu": "Zulu"
|
||||
}
|
@ -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