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

Distinct is not supported in API V1 commands

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 5.0.2
    • Fix Version/s: None
    • Component/s: None
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

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

              Dates

              Created:
              Updated:
              Resolved: