Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5617

Add kotlin helper extensions Bson instances

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Java Drivers
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      JAVA-5308 added and support but potentially could extend this support to add infix operators to bson

      Nabil commented in the Filters code review:

      we can create an infix public infix fun  Bson.and(value: Bson?): Bson = Filters.and(this, value) for
      
      (Person::name eq person.name) and Person::age.eq(person.age)
      

      This would be useful and ergonomic, just need to determine what operators to add.

            Assignee:
            nabil.hachicha@mongodb.com Nabil Hachicha
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: