[GODRIVER-272] Implement redesigned options for the Collection methods Created: 05/Mar/18 Updated: 28/Oct/23 Resolved: 29/Jun/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Options & Configuration |
| Affects Version/s: | 0.0.1 |
| Fix Version/s: | 0.0.9 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Roland Fong |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Stitch, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Epic Link: | Options Management | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
As we discussed the options for the mongo package should be implemented as a type with a method for each option that's available. For instance:
Each method should return the type. Ideally this should be implemented as a stack (see the way context.Context is implemented), this way the same base CountOptions can be attached to the mongo.Opt variable and the Options type can simply use a single copy of each type. There should be an error for each type, and either the option or the error should be set. Each Collection method should take a single *Options stack. Upon seeing the first error, it should return that error to the user. The methods should unwind the options into a slice and pass that slice to the commands. |
| Comments |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'skriptble', 'name': 'Kris Brandow', 'email': 'kris@mongodb.com'}Message: Merge branch 'pr/74'
Change-Id: I713dc0fba4bbdee2445349262ea653d101e1299c |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/runcmdopt Change-Id: Idd6ef1f97c55e0b4f270c42695c1cebb93a401a1 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/changestreamopt Change-Id: I8dffbf535f7756dd18980bcc3bf4f4e2d28092fc |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Rename ConvertOption methods Change-Id: Ia519189379e17eb224c040d2ffb8ccd4ea6f4170 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/mongoopt Change-Id: Ic859a6f885a40991616fccebec0f925fa667037a |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/dbopt Change-Id: Ie3af88a02a1bf64ab0a07a5a74438215382cdf1e |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Add mongo/collectionopt Change-Id: I801d503bdb6452de4b4537cbca32b7fb79f88a80 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Add mongo/clientopt Change-Id: I90ca993fc7605b71a4b32283694af68a68a9279d |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/deleteopt Change-Id: I288c7632ae66e39998ebcc68eb958ba8a0ec23c8 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/indexopt Change-Id: Ia89317ff936988515f6591bbda80dbd4707992e5 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/distinctopt Change-Id: Ic909c0e9930e822699540ca14d1bd5ba0b6b5bc7 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/countopt Change-Id: Iee3633f16e540fd0a97260ada6575dc47c0049b4 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Add mongo/replaceopt Change-Id: Ifed06e1f8ede8e292e431200360a79fed2ae26d3 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Add mongo/insertopt Change-Id: If3308cd368fd3e9d7cf412a47de3440a8a883236 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Add mongo/updateopt Change-Id: Ia663dfa242af5073aa774d1d25b7fb3c2f1ad3ff |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/findopt Change-Id: I6acc5c25b3ffeb1accfe8d14e7125c46d35792c5 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}Message: Allow passing aggregateopt to Aggregate Change-Id: Iec3a4446f5e6624510ddd1e75f498c2a64e5d929 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add mongo/aggregateopt Change-Id: I8101516ee7506501a2f5de2f7a634d33321b22c8 |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Add String method to all options in core. Change-Id: I835d47ce001034df2ae927fc8a6ec33c1f954f51 |
| Comment by Kristofer Brandow (Inactive) [ 23/May/18 ] |
|
Design: https://github.com/mongodb/mongo-go-driver/blob/design/options-design/DESIGN.md |