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

Merging feature branch (Kotlin extensions) into main #1572

Merged
merged 9 commits into from
Dec 2, 2024

Conversation

nhachicha
Copy link
Contributor

This completes the Epic in https://jira.mongodb.org/browse/JAVA-5624

rozza and others added 9 commits December 2, 2024 15:05
Adds a new package `org.mongodb.mongodb-driver-kotlin-extensions`. Its both, kotlin driver and bson kotlin implementation agnostic. Can be used with any combination of `bson-kotlin`, `bson-kotlinx`, `mongodb-driver-kotlin-sync` and `mongodb-driver-kotlin-coroutine`.

Initial Filters extensions support, with both inflix and nested helpers eg:

```
import com.mongodb.kotlin.client.model.Filters.eq

// infix
Person::name.eq(person.name)

// nested
val bson = eq(Person::name, person.name)
```

Also adds path based support which works with vairous annotations on the data class: `@SerialName("_id")`, `@BsonId`, `@BsonProperty("_id")`:

```
(Restaurant::reviews / Review::score).path() == "reviews.rating"
```

JAVA-5308 JAVA-5484
* Adding Kotlin extensions methods for projection. Fixes JAVA-5603

---------

Co-authored-by: Ross Lawley <ross.lawley@gmail.com>
* Adding Kotlin extension function for Updates operations
JAVA-5601
* Grouping all static checks under the "check" task

JAVA-5633
* Adding extensions for Aggregators and Accumulators
@nhachicha nhachicha self-assigned this Dec 2, 2024
@nhachicha nhachicha requested a review from jyemin December 2, 2024 15:18
@nhachicha nhachicha merged commit 103815f into main Dec 2, 2024
56 of 60 checks passed
@nhachicha nhachicha deleted the kotlin-extensions branch December 2, 2024 15:47
@vbabanin vbabanin restored the kotlin-extensions branch January 10, 2025 05:24
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.

None yet

3 participants