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

support realm equals #304

Merged
merged 29 commits into from
Mar 28, 2022
Merged

support realm equals #304

merged 29 commits into from
Mar 28, 2022

Conversation

desistefanova
Copy link
Contributor

Implemented Realm operator == and Configuration operator ==. Fixes #161

@cla-bot cla-bot bot added the cla: yes label Mar 18, 2022
@desistefanova desistefanova changed the title support Realm equals support realm equals Mar 18, 2022
@desistefanova desistefanova changed the base branch from master to upgrade_core_to_v11.12.0 March 18, 2022 16:51
@desistefanova desistefanova marked this pull request as ready for review March 21, 2022 14:10
@desistefanova desistefanova requested review from blagoev and nielsenko and removed request for blagoev March 21, 2022 16:53
Base automatically changed from upgrade_core_to_v11.12.0 to master March 23, 2022 12:58
@coveralls
Copy link

coveralls commented Mar 23, 2022

Pull Request Test Coverage Report for Build 2040653772

  • 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 91.841%

Totals Coverage Status
Change from base Build 2040576294: 0.0%
Covered Lines: 394
Relevant Lines: 429

💛 - Coveralls

@@ -52,19 +52,24 @@ class Realm {

/// Opens a `Realm` using a [Configuration] object.
Realm(Configuration config) : _config = config {
_scheduler = Scheduler(config, close);
if (_config.isInUse) {
throw RealmException("A Realm instance for this configuraiton object already exists.");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be RealmStateError. since this is not something people should catching and handling.

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
lib/src/realm_class.dart Outdated Show resolved Hide resolved
realm1.add(Person('Kasper'));
});

final realm3 = realm1.all<Person>().first.realm;
Copy link
Contributor

Choose a reason for hiding this comment

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

This test does too much. This is testing RealmResults. I suggest we remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

test/realm_test.dart Outdated Show resolved Hide resolved
@desistefanova desistefanova merged commit 816a9c5 into master Mar 28, 2022
@desistefanova desistefanova deleted the realm_equals branch March 28, 2022 08:53
@@ -52,12 +52,15 @@ class Realm {

/// Opens a `Realm` using a [Configuration] object.
Realm(Configuration config) : _config = config {
_scheduler = Scheduler(config, close);
if (_config.isInUse) {
throw RealmStateError("A Realm instance for this configuraiton object already exists.");
Copy link
Contributor

Choose a reason for hiding this comment

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

configuraiton -> configuration

@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 Realm equals
5 participants