[GODRIVER-800] Modify BatchCursor to return batch as a single slice of documents Created: 31/Jan/19 Updated: 28/Oct/23 Resolved: 11/Feb/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Core API |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.0-rc1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
BatchCursor currently returns a batch as a slice of BSON documents one after the other. While this works, it requires copying bytes from their array format into a document sequence. Add a new type, bsoncore.DocumentSequence, that contains a slice of bytes, boolean indicating if the slice of bytes is a document sequence or a BSON array of documents, and an int32 indicating the position of the start of the next document. This type should have a Documents method that will return a []bsoncore.Document. This type should also have a Next method which returns a bsoncore.Document and an error. |
| Comments |
| Comment by Githook User [ 11/Feb/19 ] |
|
Author: {'name': 'Kris Brandow', 'email': 'kris@mongodb.com', 'username': 'skriptble'}Message: Add bsoncore.DocumentSequence for BatchCursor Add the bsoncore.DocumentSequence type and use it in BatchCursor. Change-Id: I3b95cce0e7693559d9b79541156622cb1ab3b977 |
| Comment by Kristofer Brandow (Inactive) [ 02/Feb/19 ] |
|
Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/443085. |