reactivedb
Advanced tools
Comparing version 0.9.9 to 0.9.10-alpha.0
{ | ||
"name": "reactivedb", | ||
"version": "0.9.9", | ||
"version": "0.9.10-alpha.0", | ||
"description": "Reactive ORM for Lovefield", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
import { Observable } from 'rxjs/Observable' | ||
import { Selector } from './Selector' | ||
import { ProxySelector } from './ProxySelector' | ||
import { assert } from '../../utils/assert' | ||
import { TokenConsumed } from '../../exception/token' | ||
@@ -10,2 +12,4 @@ export type SelectorMeta<T> = Selector<T> | ProxySelector<T> | ||
private consumed = false | ||
constructor(selector$: Observable<SelectorMeta<T>>) { | ||
@@ -23,2 +27,5 @@ this.selector$ = selector$.publishReplay(1) | ||
values(): Observable<T[]> { | ||
assert(!this.consumed, TokenConsumed()) | ||
this.consumed = true | ||
return (this.selector$ as Observable<Selector<T>>) | ||
@@ -30,2 +37,5 @@ .switchMap(s => s.values()) | ||
changes(): Observable<T[]> { | ||
assert(!this.consumed, TokenConsumed()) | ||
this.consumed = true | ||
return (this.selector$ as Observable<Selector<T>>) | ||
@@ -32,0 +42,0 @@ .switchMap(s => s.changes()) |
@@ -188,5 +188,2 @@ import { Observer } from 'rxjs/Observer' | ||
values(): Observable<T[]> | never { | ||
assert(!this.consumed, Exception.TokenConsumed()) | ||
this.consumed = true | ||
if (typeof this.limit !== 'undefined' || typeof this.skip !== 'undefined') { | ||
@@ -220,4 +217,2 @@ const p = this.rangeQuery.exec() | ||
changes(): Observable<T[]> | never { | ||
assert(!this.consumed, Exception.TokenConsumed()) | ||
this.consumed = true | ||
return this.mapFn(this.change$) | ||
@@ -224,0 +219,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export default '0.9.9' | ||
export default '0.9.10-alpha.0' |
@@ -7,2 +7,3 @@ import { Observable } from 'rxjs/Observable'; | ||
selector$: Observable<SelectorMeta<T>>; | ||
private consumed; | ||
constructor(selector$: Observable<SelectorMeta<T>>); | ||
@@ -9,0 +10,0 @@ map<K>(fn: (stream$: Observable<T[]>) => Observable<K[]>): QueryToken<K>; |
@@ -5,4 +5,7 @@ "use strict"; | ||
var ProxySelector_1 = require("./ProxySelector"); | ||
var assert_1 = require("../../utils/assert"); | ||
var token_1 = require("../../exception/token"); | ||
var QueryToken = (function () { | ||
function QueryToken(selector$) { | ||
this.consumed = false; | ||
this.selector$ = selector$.publishReplay(1) | ||
@@ -17,2 +20,4 @@ .refCount(); | ||
QueryToken.prototype.values = function () { | ||
assert_1.assert(!this.consumed, token_1.TokenConsumed()); | ||
this.consumed = true; | ||
return this.selector$ | ||
@@ -23,2 +28,4 @@ .switchMap(function (s) { return s.values(); }) | ||
QueryToken.prototype.changes = function () { | ||
assert_1.assert(!this.consumed, token_1.TokenConsumed()); | ||
this.consumed = true; | ||
return this.selector$ | ||
@@ -25,0 +32,0 @@ .switchMap(function (s) { return s.changes(); }); |
@@ -178,4 +178,2 @@ "use strict"; | ||
var _this = this; | ||
utils_1.assert(!this.consumed, Exception.TokenConsumed()); | ||
this.consumed = true; | ||
if (typeof this.limit !== 'undefined' || typeof this.skip !== 'undefined') { | ||
@@ -215,4 +213,2 @@ var p = this.rangeQuery.exec() | ||
Selector.prototype.changes = function () { | ||
utils_1.assert(!this.consumed, Exception.TokenConsumed()); | ||
this.consumed = true; | ||
return this.mapFn(this.change$); | ||
@@ -219,0 +215,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
declare var _default: "0.9.9"; | ||
declare var _default: "0.9.10-alpha.0"; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = '0.9.9'; | ||
exports.default = '0.9.10-alpha.0'; | ||
//# 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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258032
4651