1
0
Fork 0

add caching for db._collection() on client side

This commit is contained in:
jsteemann 2016-12-13 16:05:29 +01:00
parent 4d76ef962b
commit 3be94b6014
1 changed files with 4 additions and 0 deletions

View File

@ -270,6 +270,10 @@ ArangoDatabase.prototype._collections = function () {
// //////////////////////////////////////////////////////////////////////////////
ArangoDatabase.prototype._collection = function (id) {
if (typeof id !== 'number' &&
this[id] && this[id] instanceof this._collectionConstructor) {
return this[id];
}
var url;
if (typeof id === 'number') {