all files / src/ Collection.js

8.33% Statements 1/12
100% Branches 0/0
0% Functions 0/10
8.33% Lines 1/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                                                                     
'use strict';
class Collection {
    constructor(name, connection) {
        this._name = name;
        this._connection = connection;
    }
    get name() {
        return this._name;
    }
    get connection() {
        return this._connection;
    }
    count(query) {
        return this._connection.count(this._name, query);
    }
    delete(query) {
        return this._connection.delete(this._name, query);
    }
    deleteById(id) {
        return this._connection.deleteById(this._name, id);
    }
    find(query) {
        return this._connection.find(this._name, query);
    }
    get(id) {
        return this._connection.get(this._name, id);
    }
    save(doc) {
        return this._connection.save(this._name, doc);
    }
    updateAttributes(id, doc) {
        return this._connection.updateAttributes(this._name, id, doc);
    }
}
exports.Collection = Collection;