Skip to content

Commit

Permalink
7.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Apr 24, 2018
1 parent f6ea7b0 commit 8328124
Show file tree
Hide file tree
Showing 32 changed files with 659 additions and 464 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

### X.X.X (comming soon)
### 7.5.0 (April 24, 2018)

Features:
- Added `RxCollection.insert$`, `RxCollection.update$`, `RxCollection.remove$` [read the docs](https://pubkey.github.io/rxdb/rx-collection.html#observe-)
Expand Down
5 changes: 4 additions & 1 deletion dist/es/plugins/replication.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ export function sync(_ref2) {

options = util.clone(options);
// if remote is RxCollection, get internal pouchdb
if (RxCollection.isInstanceOf(remote)) remote = remote.pouch;
if (RxCollection.isInstanceOf(remote)) {
remote.watchForChanges();
remote = remote.pouch;
}

if (query && this !== query.collection) {
throw RxError.newRxError('RC2', {
Expand Down
21 changes: 21 additions & 0 deletions dist/es/rx-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,27 @@ export var RxCollection = function () {
get: function get() {
return this._observable$;
}
}, {
key: 'insert$',
get: function get() {
return this.$.pipe(filter(function (cE) {
return cE.data.op === 'INSERT';
}));
}
}, {
key: 'update$',
get: function get() {
return this.$.pipe(filter(function (cE) {
return cE.data.op === 'UPDATE';
}));
}
}, {
key: 'remove$',
get: function get() {
return this.$.pipe(filter(function (cE) {
return cE.data.op === 'REMOVE';
}));
}
}, {
key: 'onDestroy',
get: function get() {
Expand Down
Loading

0 comments on commit 8328124

Please sign in to comment.