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

Implement list of nullables with minimal refactorings #902

Merged
merged 3 commits into from
Sep 26, 2022

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented Sep 14, 2022

Allow list of nullable primitives in realm models, such as:

@RealmModel()
class _Player {
  @PrimaryKey()
  late String name;
  final scoresByRound = <int?>[]; // null means player didn't finish
}

Fixes #163 (supersedes #708)

@cla-bot cla-bot bot added the cla: yes label Sep 14, 2022
@nielsenko nielsenko requested a review from blagoev September 14, 2022 10:48
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3052154069

  • -2 of 7 (71.43%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+5.7%) to 92.908%

Changes Missing Coverage Covered Lines Changed/Added Lines %
generator/lib/src/dart_type_ex.dart 3 5 60.0%
Totals Coverage Status
Change from base Build 3036688559: 5.7%
Covered Lines: 393
Relevant Lines: 423

💛 - Coveralls

@coveralls
Copy link

coveralls commented Sep 14, 2022

Pull Request Test Coverage Report for Build 3125627969

  • 5 of 7 (71.43%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.1%) to 86.602%

Changes Missing Coverage Covered Lines Changed/Added Lines %
generator/lib/src/dart_type_ex.dart 3 5 60.0%
Totals Coverage Status
Change from base Build 3115288468: -1.1%
Covered Lines: 1797
Relevant Lines: 2075

💛 - Coveralls

Copy link
Member

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

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

Looks fine, even though I'd have preferred the const schema approach.

@nielsenko nielsenko force-pushed the kn/nullable-in-collections-no-refactoring branch 7 times, most recently from f94c072 to b027b2c Compare September 23, 2022 11:40
Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

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

Looks good, just want to make sure we have noticed the change in my comment.

lib/src/realm_object.dart Show resolved Hide resolved
@nielsenko nielsenko force-pushed the kn/nullable-in-collections-no-refactoring branch from b027b2c to 043695c Compare September 23, 2022 19:27
@nielsenko nielsenko force-pushed the kn/nullable-in-collections-no-refactoring branch from 043695c to a6ef9fc Compare September 23, 2022 20:00
@nielsenko nielsenko requested a review from blagoev September 23, 2022 20:09
@nielsenko nielsenko force-pushed the kn/nullable-in-collections-no-refactoring branch from a6e72f7 to 0cad63f Compare September 26, 2022 06:46
@nielsenko nielsenko merged commit ab3ab99 into master Sep 26, 2022
@nielsenko nielsenko deleted the kn/nullable-in-collections-no-refactoring branch September 26, 2022 09:12
@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 nullable types in collections
5 participants