mirror of https://gitee.com/bigwinds/arangodb
add caching for db._collection() on client side
This commit is contained in:
parent
4d76ef962b
commit
3be94b6014
|
@ -270,6 +270,10 @@ ArangoDatabase.prototype._collections = function () {
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ArangoDatabase.prototype._collection = function (id) {
|
ArangoDatabase.prototype._collection = function (id) {
|
||||||
|
if (typeof id !== 'number' &&
|
||||||
|
this[id] && this[id] instanceof this._collectionConstructor) {
|
||||||
|
return this[id];
|
||||||
|
}
|
||||||
var url;
|
var url;
|
||||||
|
|
||||||
if (typeof id === 'number') {
|
if (typeof id === 'number') {
|
||||||
|
|
Loading…
Reference in New Issue