Skip to content

refactor(db): WIP new database API #1156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Sep 28, 2017
Merged

refactor(db): WIP new database API #1156

merged 28 commits into from
Sep 28, 2017

Conversation

davideast
Copy link
Collaborator

@davideast davideast commented Sep 15, 2017

See #1158 for details. If you have comments about the API please direct your feedback to that issue to keep the discussion in one place. However, if you have questions or improvements for the code please place them here.

import 'rxjs/add/operator/skipWhile';
import 'rxjs/add/operator/withLatestFrom';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/filter';
Copy link

@Toxicable Toxicable Sep 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Totally on the //TODO: FIX THIS list. Wanted to get the POC up and running first.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah no probs, just being nit picky

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are always welcome :)

.map((combined: SnapshotPrevKey) => {
const {snapshot, prevKey} = combined;
return { event, snapshot, prevKey }
}).delay(0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats up with this delay?
Looks like you're trying to ensure that it's at the end of the event loop?

Copy link
Collaborator Author

@davideast davideast Sep 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! This is really for operations that happen with disconnected connections or when data exists in the cache. They can sometimes happen synchronously, which is an unfortunate quirk of the SDK.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, sounds legit. Maybe a small comment noting that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants