‘db._collection(collectionName)’ method is used to get collection by name. This method return null, if no collection exists with given name.
Example
var analyzerColleciton = db._collection("_analyzers")
127.0.0.1:8529@_system> db._collections() [ [ArangoCollection 19, "_analyzers" (type document, status loaded)], [ArangoCollection 34, "_appbundles" (type document, status loaded)], [ArangoCollection 31, "_apps" (type document, status loaded)], [ArangoCollection 22, "_aqlfunctions" (type document, status loaded)], [ArangoCollection 43, "_fishbowl" (type document, status loaded)], [ArangoCollection 37, "_frontend" (type document, status loaded)], [ArangoCollection 7, "_graphs" (type document, status loaded)], [ArangoCollection 28, "_jobs" (type document, status loaded)], [ArangoCollection 40, "_modules" (type document, status loaded)], [ArangoCollection 25, "_queues" (type document, status loaded)], [ArangoCollection 10, "_statistics" (type document, status loaded)], [ArangoCollection 13, "_statistics15" (type document, status loaded)], [ArangoCollection 16, "_statisticsRaw" (type document, status loaded)] ] 127.0.0.1:8529@_system> var analyzerColleciton = db._collection("_analyzers") 127.0.0.1:8529@_system> analyzerColleciton [ArangoCollection 19, "_analyzers" (type document, status loaded)]
No comments:
Post a Comment