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

CBL-5181: Array Index API tests and adjustments #3330

Merged
merged 6 commits into from
Oct 7, 2024
Merged

Conversation

velicuvlad
Copy link
Contributor

@velicuvlad velicuvlad commented Oct 2, 2024

  • updated LiteCore to 3.2.1-5
  • moved Internal section at the end of file for Objective-C/CBLCollection.mm
  • implement internal indexesInfo which is exactly coll.indexes() but keeping all information for each index found, not only stripping the name out of it
  • fixed expectExcepion typo
  • tests for both Obj-C and Swift for Array Index API
  • contains CBL-5899 as well

@@ -33,7 +35,7 @@

NS_ASSUME_NONNULL_BEGIN

@interface CBLCollection () <CBLRemovableListenerToken>
@interface CBLCollection () <CBLRemovableListenerToken, CBLIndexableInternal>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a reason to create a protocol for CBLIndexableInternal as CBLCollection will not be used as CBLIndexableInternal type. I think you can just add a method indexesInfo in CBLCollection() directly.


NS_ASSUME_NONNULL_BEGIN

@protocol CBLIndexableInternal <CBLIndexable>
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need to create the protocol for this as the method can be put directly to CBLCollection Internal.

Also no need to have underscored prefix as this function will not be a public API.

@velicuvlad velicuvlad marked this pull request as ready for review October 4, 2024 15:54
@velicuvlad velicuvlad requested a review from pasin October 4, 2024 16:38
Copy link
Contributor

@pasin pasin left a comment

Choose a reason for hiding this comment

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

One comment and the rest is looking good.

[NSException raise: NSInvalidArgumentException format:
@"Expressions cannot be empty "];
@"Empty expressions is not allowed, use nil instead"];
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add another validation for a single empty string ? We don't allow that to be set as well. See the updated API spec.

@velicuvlad velicuvlad merged commit e2c459c into release/3.2 Oct 7, 2024
8 checks passed
@velicuvlad velicuvlad deleted the CBL-5181 branch October 7, 2024 14:25
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.

2 participants