File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
15
15
"go.mongodb.org/mongo-driver/bson"
16
16
"go.mongodb.org/mongo-driver/bson/bsoncodec"
17
17
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
18
+ "go.mongodb.org/mongo-driver/x/mongo/driver"
18
19
"go.mongodb.org/mongo-driver/x/mongo/driver/session"
19
20
"go.mongodb.org/mongo-driver/x/mongo/driverlegacy"
20
21
)
@@ -223,3 +224,10 @@ func (c *Cursor) closeImplicitSession() {
223
224
c .clientSession .EndSession ()
224
225
}
225
226
}
227
+
228
+ // BatchCursorFromCursor returns a driver.BatchCursor for the given Cursor. If there is no underlying driver.BatchCursor,
229
+ // nil is returned. This method is deprecated and does not have any stability guarantees. It may be removed in the future.
230
+ func BatchCursorFromCursor (c * Cursor ) * driver.BatchCursor {
231
+ bc , _ := c .bc .(* driver.BatchCursor )
232
+ return bc
233
+ }
You can’t perform that action at this time.
0 commit comments