[SERVER-23791] Add collation parameter to shell helpers Created: 18/Apr/16  Updated: 06/Jun/16  Resolved: 03/Jun/16

Status: Closed
Project: Core Server
Component/s: Querying, Shell
Affects Version/s: None
Fix Version/s: 3.3.8

Type: Task Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 16 (06/24/16)
Participants:

 Description   

Collection creation:

db.createCollection("myColl", {collation: {...}});

Index creation:

db.coll.ensureIndex({key: 1, pattern: 1}, {collation: {...}});
db.coll.createIndex({key: 1, pattern: 1}, {collation: {...}});
db.coll.createIndexes([{key: 1}, {pattern: 1}], {collation: {...}});

Operations:

db.coll.find().collation({...});
db.coll.find().collation({...}).count();
db.coll.aggregate([..], {collation: {...}});
db.coll.distinct(<key>, <predicate>, {collation: {...}});
db.coll.findAndModify({<update|remove>: ..., collation: {...});
db.coll.group({
key: ...,
reduce: ...,
initial: ...,
collation: {...}
});
db.coll.mapReduce(<map>, <reduce>, {collation: {...}});
db.coll.remove(<predicate>, {collation: {...}});
db.coll.update(<predicate>, <mods>, {collation: {...}});

(Note that geoNear is omitted because it does not have a shell helper.)

CRUD API:

db.coll.bulkWrite([
    {updateOne: {..., collation: {...}}},
    {updateMany: {..., collation: {...}}},
    {replaceOne: {..., collation: {...}}},
    {deleteOne: {..., collation: {...}}},
    {deleteMany: {..., collation: {...}}}
]);
db.coll.deleteOne(<filter>, {collation: {...}});
db.coll.deleteMany(<filter>, {collation: {...}});
db.coll.findOneAndDelete(<filter>, {collation: {...}});
db.coll.findOneAndReplace(
<filter>, <replacement>, {collation: {...}}
);
db.coll.findOneAndUpdate(
<filter>, <update>, {collation: {...}}
);
db.coll.replaceOne(<filter>, <replacement>, {collation: {...}});
db.coll.updateOne(<filter>, <update>, {collation: {...}});
db.coll.updateMany(<filter>, <update>, {collation: {...}});

Bulk write API:

var bulk = db.coll.initializeUnorderedBulkOp();
bulk.find({...}).collation({...});
bulk.execute();



 Comments   
Comment by Githook User [ 03/Jun/16 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-23791 harden integration testing for commands that accept a collation

Also fixes bugs in collation plumbing for the following commands:

Comment by Githook User [ 10/May/16 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-23791 extend shell helpers to pass collation parameter to server

Includes changes to the following:

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