Skip to content
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

Introduced Batch #15

Merged
merged 2 commits into from
Oct 11, 2019
Merged

Introduced Batch #15

merged 2 commits into from
Oct 11, 2019

Conversation

sgr-ksmt
Copy link
Owner

Introduced Batch class. It can avoid try keyword on create/update compared to Batch+Extension.

  • Before
let batch = Firestore.firestore().batch()
try! batch.create(user)
try! batch.create(task)
  • After
let batch = Batch()
    .create(user)
    .create(task) // It can method chain style.

batch.commit{ error in
    // Emit error if extracting snapshot failed or `commit` failed.
}

@sgr-ksmt sgr-ksmt merged commit 5bd5066 into master Oct 11, 2019
@sgr-ksmt sgr-ksmt deleted the batch branch October 11, 2019 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant