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

Distinct is not supported in API V1 commands

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.2
    • Component/s: 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' );

      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`?

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

              Created:
              Updated:
              Resolved: