Urigo / meteor-rxjs

Exposing Mongo Cursor as RxJS Observable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ObservableCollection.upsert() returns wrong type

ijager opened this issue · comments

The docstring says:

@returns {Observable<{numberAffected, insertedId}>} Observable which completes with an * Object that contain the keys numberAffected and insertedId.

However the return value is let obs = this._createObservable<number>(observers);

So either there is a bug in the documentation or in the implementation.

Edit:

So The original Meteor Collection.upsert() function actually returns {numberAffected, insertedId} directly instead of in the callback.

commented

InsertedId is what makes upsert worthy , no sense to drop it and return only the number of affected rows.
Any progress with this one?