mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-06-12 16:53:35 +00:00
Get function is now known as GetNext
This commit is contained in:
@@ -16,10 +16,10 @@ type ManyLoader struct {
|
|||||||
target interface{}
|
target interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get loads documents to a target or returns an error
|
// GetNext loads next documents to a target or returns an error
|
||||||
func (l *ManyLoader) Get() error {
|
func (l *ManyLoader) GetNext() error {
|
||||||
|
|
||||||
hasNext := l.Next(l.ctx)
|
hasNext := l.Cursor.Next(l.ctx)
|
||||||
|
|
||||||
if !hasNext {
|
if !hasNext {
|
||||||
return errors.NotFoundErrorf("%s", mongo.ErrNoDocuments)
|
return errors.NotFoundErrorf("%s", mongo.ErrNoDocuments)
|
||||||
|
|||||||
Reference in New Issue
Block a user