Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return Rx.Observable.create(observer => {
const unsubscribe = QuerySubscriptionPool.add(query, result => observer.onNext(result));
return Rx.Disposable.create(unsubscribe);
});
};
return Rx.Observable.create((observer) => {
const pool = this._database._querySubscriptionPool;
let unsubscribe = null;
if (allowQueryChanges) {
unsubscribe = pool.addPrivateSubscription(name, this, (v) => observer.onNext(v));
} else {
unsubscribe = pool.add(this, (v) => observer.onNext(v));
}
return Rx.Disposable.create(unsubscribe);
});
}