UNPKG

blow-data-service

Version:

Observable data service for Blow.

36 lines (35 loc) 883 B
'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;