[GODRIVER-1531] Ability to rename a collection Created: 12/Mar/20 Updated: 17/Mar/20 Resolved: 17/Mar/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Rama Kundurthi | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Core mongo API supports the ability to rename a collection. Can this be added to GODRIVER as well?
ref: https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/ |
| Comments |
| Comment by Divjot Arora (Inactive) [ 17/Mar/20 ] |
|
Great! I'm going to close out this ticket. Feel free to leave another comment or open a new ticket if you have any other issues. – Divjot |
| Comment by Rama Kundurthi [ 17/Mar/20 ] |
|
Sure. Thanks. |
| Comment by Divjot Arora (Inactive) [ 16/Mar/20 ] |
|
We try to limit the number of administrative helpers in the driver as these kinds of tasks are usually done through the shell or other scripts rather than in an application. You can rename a collection by running the renameCollection command through Database.RunCommand. Would this solution be satisfactory for your use case? – Divjot |