reactivedb
Advanced tools
Comparing version 0.10.4-alpha.3-diff to 0.10.4-alpha.4-diff
{ | ||
"name": "reactivedb", | ||
"version": "0.10.4-alpha.3-diff", | ||
"version": "0.10.4-alpha.4-diff", | ||
"description": "Reactive ORM for Lovefield", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -40,6 +40,5 @@ import { Observable } from 'rxjs/Observable' | ||
changesWithOps(): Observable<{ result: T[], ops: Ops}> | never { | ||
changesWithOps(pk?: string): Observable<{ result: T[], ops: Ops}> | never { | ||
return this.request$.pipe( | ||
map((result: T[]) => { | ||
const pk = 'id' | ||
const ops = diff(this.lastEmit || [], result, pk) | ||
@@ -46,0 +45,0 @@ return { result, ops } |
@@ -61,3 +61,3 @@ import { Observable } from 'rxjs/Observable' | ||
changesWithOps(): Observable<{ result: T[], ops: Ops}> { | ||
changesWithOps(pk?: string): Observable<{ result: T[], ops: Ops}> { | ||
assert(!this.consumed, TokenConsumed()) | ||
@@ -67,3 +67,3 @@ | ||
return this.selector$.pipe( | ||
switchMap((s) => s.changesWithOps()), | ||
switchMap((s) => s.changesWithOps(pk)), | ||
) | ||
@@ -70,0 +70,0 @@ } |
@@ -252,6 +252,5 @@ import { Observer } from 'rxjs/Observer' | ||
changesWithOps(): Observable<{ result: T[], ops: Ops}> | never { | ||
changesWithOps(pk?: string): Observable<{ result: T[], ops: Ops}> | never { | ||
return this.change$.pipe( | ||
map((result: T[]) => { | ||
const pk = 'id' | ||
const ops = diff(this.lastEmit || [], result, pk) | ||
@@ -258,0 +257,0 @@ return { result, ops } |
@@ -1,1 +0,1 @@ | ||
export default '0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-lazyassert-lazyassert' | ||
export default '0.10.4-alpha.4-diff' |
@@ -15,3 +15,3 @@ import { Observable } from 'rxjs/Observable'; | ||
getLastEmit(): T[]; | ||
changesWithOps(): Observable<{ | ||
changesWithOps(pk?: string): Observable<{ | ||
result: T[]; | ||
@@ -18,0 +18,0 @@ ops: Ops; |
@@ -25,6 +25,5 @@ "use strict"; | ||
}; | ||
ProxySelector.prototype.changesWithOps = function () { | ||
ProxySelector.prototype.changesWithOps = function (pk) { | ||
var _this = this; | ||
return this.request$.pipe(map_1.map(function (result) { | ||
var pk = 'id'; | ||
var ops = diff_1.default(_this.lastEmit || [], result, pk); | ||
@@ -31,0 +30,0 @@ return { result: result, ops: ops }; |
@@ -14,3 +14,3 @@ import { Observable } from 'rxjs/Observable'; | ||
changes(): Observable<T[]>; | ||
changesWithOps(): Observable<{ | ||
changesWithOps(pk?: string): Observable<{ | ||
result: T[]; | ||
@@ -17,0 +17,0 @@ ops: Ops; |
@@ -35,6 +35,6 @@ "use strict"; | ||
}; | ||
QueryToken.prototype.changesWithOps = function () { | ||
QueryToken.prototype.changesWithOps = function (pk) { | ||
assert_1.assert(!this.consumed, token_1.TokenConsumed()); | ||
this.consumed = true; | ||
return this.selector$.pipe(switchMap_1.switchMap(function (s) { return s.changesWithOps(); })); | ||
return this.selector$.pipe(switchMap_1.switchMap(function (s) { return s.changesWithOps(pk); })); | ||
}; | ||
@@ -41,0 +41,0 @@ QueryToken.prototype.concat = function () { |
@@ -36,3 +36,3 @@ /// <reference types="lovefield" /> | ||
changes(): Observable<T[]> | never; | ||
changesWithOps(): Observable<{ | ||
changesWithOps(pk?: string): Observable<{ | ||
result: T[]; | ||
@@ -39,0 +39,0 @@ ops: Ops; |
@@ -224,6 +224,5 @@ "use strict"; | ||
}; | ||
Selector.prototype.changesWithOps = function () { | ||
Selector.prototype.changesWithOps = function (pk) { | ||
var _this = this; | ||
return this.change$.pipe(map_1.map(function (result) { | ||
var pk = 'id'; | ||
var ops = diff_1.default(_this.lastEmit || [], result, pk); | ||
@@ -230,0 +229,0 @@ return { result: result, ops: ops }; |
@@ -1,2 +0,2 @@ | ||
declare const _default: "0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-lazyassert-lazyassert"; | ||
declare const _default: "0.10.4-alpha.4-diff"; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = '0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-alpha0.10.4-alpha.2-diff-alpha0.10.4-alpha.2-diff-diff-lazyassert-lazyassert-lazyassert'; | ||
exports.default = '0.10.4-alpha.4-diff'; | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
301111
5479