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

return from write #294

Merged
merged 14 commits into from
Mar 25, 2022
Merged

return from write #294

merged 14 commits into from
Mar 25, 2022

Conversation

desistefanova
Copy link
Contributor

Return result from write method callback. Fixes #67

@cla-bot cla-bot bot added the cla: yes label Mar 14, 2022
@coveralls
Copy link

coveralls commented Mar 14, 2022

Pull Request Test Coverage Report for Build 2028750405

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.706%

Totals Coverage Status
Change from base Build 2028514857: 0.0%
Covered Lines: 402
Relevant Lines: 429

💛 - Coveralls

@@ -166,11 +166,12 @@ class Realm {
///
/// If no exception is thrown from within the callback, the transaction will be committed.
/// It is more efficient to update several properties or even create multiple objects in a single write transaction.
void write(void Function() writeCallback) {
TResult write<TResult>(TResult Function() writeCallback) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest we use T here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

lib/src/realm_class.dart Outdated Show resolved Hide resolved
test/realm_test.dart Outdated Show resolved Hide resolved
@desistefanova desistefanova merged commit 7001b92 into master Mar 25, 2022
@desistefanova desistefanova deleted the return_from_write branch March 25, 2022 14:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support result value from write transaction callbacks
4 participants