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

Support providing collation per operation

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None

      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.

            Assignee:
            barrie Barrie Segal
            Reporter:
            rathi.gnanasekaran Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: