Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59569

Distinct is not supported in API V1 commands

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 5.0.2
    • None
    • None
    • ALL
    • Hide

      const client = new MongoClient(uri, { serverApi: { version: '1', strict: true } });
       
      await client.db(DB).collection(COLLETION).distinct('foo');

      Show
      const client = new MongoClient(uri, { serverApi: { version: '1' , strict: true } });   await client.db(DB).collection(COLLETION).distinct( 'foo' );

    Description

      According to the commands listed in the API V1 commands `distinct` is not among these commands.

      Commands and features outside of the Versioned API do not have the same backward compatibility guarantees as versioned alternatives.

      We can use a non-strict client to use this command for now. But what is the recommendation for future proofing compatibility on applications that need to use `distinct`?

      Attachments

        Activity

          People

            jacob.evans@mongodb.com Jacob Evans
            avaly@plexapp.com Valentin Agachi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: