Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-291

Support providing collation per operation

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • # Replies:
      11
    • Last comment by Customer:
      false
    • SERVER fixVersion:
      3.4

      Description

      As of server version 3.4 (max wire version 5), a collation option is supported for some commands. Helpers for the following commands therefore must be updated:

      • create
      • createIndexes
      • aggregate
      • count
      • distinct
      • find (command only)
      • findAndModify
      • geoNear
      • group
      • mapReduce
      • remove (command)
      • update (command)

      The follow CRUD API methods are thus affected. Supporting a collation option for these methods is required:

      • count
      • distinct
      • find
      • deleteOne
      • deleteMany
      • findOneAndDelete
      • findOneAndReplace
      • findOneAndUpdate
      • replaceOne
      • updateMany
      • updateOne

      Support defining an index as a key pattern

      Creating an index, dropping an index, and providing an index hint will support collations defined as documents.

      Note about bulk writes

      Given the definition of a Bulk Write Model as a document in the form:

      { updateOne: {  filter: {..}, update: {...} } }
      

      or

      { deleteOne: {  filter: {..} } }
      

      etc., a collation can be defined for each bulk write model as in the following example:

      db.collection.bulkWrite([
      {updateOne: {..., collation: {...}}},
      {updateMany: {..., collation: {...}}},
      {replaceOne: {..., collation: {...}}},
      {deleteOne: {..., collation: {...}}},
      {deleteMany: {..., collation: {...}}}
      ]);
      

      The driver must not automatically add a collation to any of the Bulk Write Models; the user must explicitly provide the collation to each.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since reply:
                  2 years, 24 weeks, 6 days ago
                  Date of 1st Reply: