[DRIVERS-291] Support providing collation per operation Created: 01/Mar/16  Updated: 27/May/22  Resolved: 31/Oct/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Barrie Segal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-1372 Support providing collation per opera... Closed
depends on CSHARP-1706 Support providing collation per opera... Closed
depends on CXX-970 Support collation per collection & op... Closed
depends on CXX-971 Support providing collation per opera... Closed
depends on JAVA-2241 Support collation Closed
depends on NODE-754 Support providing collation per opera... Closed
depends on PHPC-734 Support providing collation per opera... Closed
depends on PHPLIB-205 Support providing collation per opera... Closed
depends on PYTHON-1113 Support collation per operation Closed
depends on RUBY-1126 Support providing collation per opera... Closed
depends on RUST-34 Support providing collation per opera... Closed
depends on SERVER-1920 Sort by collation Closed
Related
related to DOCS-8730 Collation support Closed
is related to DOCS-8602 Add collation to Driver docs playbook Closed
is related to SERVER-24239 Add support for building indices with... Closed
Server Compat: 3.3, 3.4
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CXX-971 Done 3.1.0
JAVA-2241 Done 3.4.0
CXX-970 Won't Fix
PYTHON-1113 Done 3.4
CDRIVER-1372 Done 1.5.0
PERL-635 Done 1.6.0
NODE-754 Done 2.2.7
CSHARP-1706 Done 2.4
RUBY-1126 Done 2.4.0
PHPC-734 Done 1.2.0-alpha3, 1.2.0
PHPLIB-205 Done 1.1.0
SCALA-249 Done
RUST-34 Fixed 0.9.0-alpha

 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.



 Comments   
Comment by Rathi Gnanasekaran [ 31/Oct/16 ]

Resolving ticket as all linked tickets are closed.

Comment by Githook User [ 11/Aug/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@10gen.com'}

Message: Merge pull request #93 from estolfo/DRIVERS-291-collation

DRIVERS-291 Add collation option to CRUD spec
Branch: master
https://github.com/mongodb/specifications/commit/5099563c7e212ac6ed6b1edf0da451a1d609b332

Comment by Githook User [ 11/Aug/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@10gen.com'}

Message: Merge pull request #93 from estolfo/DRIVERS-291-collation

DRIVERS-291 Add collation option to CRUD spec
Branch: master
https://github.com/mongodb/specifications/commit/5099563c7e212ac6ed6b1edf0da451a1d609b332

Comment by Githook User [ 11/Aug/16 ]

Author:

{u'username': u'estolfo', u'name': u'Emily', u'email': u'emily@mongodb.com'}

Message: DRIVERS-291 Add collation option to CRUD spec
Branch: master
https://github.com/mongodb/specifications/commit/412bcd9e83b3ca374183710d1b62b3ab0470b21a

Comment by Githook User [ 08/Aug/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #94 from estolfo/DRIVERS-291-collation-update

DRIVERS-291 Update collation language following decision to only support it per-operation
Branch: master
https://github.com/mongodb/specifications/commit/0a14ffe82597e89fd4666183f4a9fc69e0a2ba14

Comment by Githook User [ 08/Aug/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #94 from estolfo/DRIVERS-291-collation-update

DRIVERS-291 Update collation language following decision to only support it per-operation
Branch: master
https://github.com/mongodb/specifications/commit/0a14ffe82597e89fd4666183f4a9fc69e0a2ba14

Comment by Githook User [ 08/Aug/16 ]

Author:

{u'username': u'estolfo', u'name': u'Emily', u'email': u'emily@mongodb.com'}

Message: DRIVERS-291 Update collation language following decision to only support it per-operation
Branch: master
https://github.com/mongodb/specifications/commit/73a4a0d18d6b76f237f55494c5db7fb63acf021b

Comment by Githook User [ 25/May/16 ]

Author:

{u'username': u'estolfo', u'name': u'Emily S', u'email': u'emily@10gen.com'}

Message: Merge pull request #85 from estolfo/DRIVERS-291-collation

DRIVERS-291 Add collation option to Index management spec
Branch: master
https://github.com/mongodb/specifications/commit/25b9daace8f4ca8d2a4654104e2938f98a4728df

Comment by Githook User [ 25/May/16 ]

Author:

{u'username': u'estolfo', u'name': u'Emily S', u'email': u'emily@10gen.com'}

Message: Merge pull request #85 from estolfo/DRIVERS-291-collation

DRIVERS-291 Add collation option to Index management spec
Branch: master
https://github.com/mongodb/specifications/commit/25b9daace8f4ca8d2a4654104e2938f98a4728df

Comment by Githook User [ 25/May/16 ]

Author:

{u'username': u'estolfo', u'name': u'Emily', u'email': u'emily@mongodb.com'}

Message: DRIVERS-291 Note server version for which collation applies
Branch: master
https://github.com/mongodb/specifications/commit/c1159894b043e423f6071d413d97236c03621881

Comment by Githook User [ 25/May/16 ]

Author:

{u'username': u'estolfo', u'name': u'Emily', u'email': u'emily@mongodb.com'}

Message: DRIVERS-291 Add collation option to Index management spec
Branch: master
https://github.com/mongodb/specifications/commit/675501681d00acc63fd1f95bf808a48bf740bb68

Generated at Thu Feb 08 08:21:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.