Fix comments

v2 v2.0.10
Nikita Tokarchuk 4 years ago
parent e087825026
commit 80a5c864c5
No known key found for this signature in database
GPG Key ID: DBFD964471BAE65C
  1. 4
      mongox/database/streamloader.go
  2. 1
      mongox/query/query.go

@ -71,11 +71,12 @@ func (l *StreamLoader) Next() (err error) {
return return
} }
// Cursor returns the underlying cursor
func (l *StreamLoader) Cursor() (cursor *mongox.Cursor) { func (l *StreamLoader) Cursor() (cursor *mongox.Cursor) {
return l.cur return l.cur
} }
// Close cursor // Close stream loader and the underlying cursor
func (l *StreamLoader) Close() (err error) { func (l *StreamLoader) Close() (err error) {
closerr := l.cur.Close(l.ctx) closerr := l.cur.Close(l.ctx)
@ -94,6 +95,7 @@ func (l *StreamLoader) Close() (err error) {
return return
} }
// Err returns the last error
func (l *StreamLoader) Err() (err error) { func (l *StreamLoader) Err() (err error) {
return l.cur.Err() return l.cur.Err()
} }

@ -119,6 +119,7 @@ func (q *Query) OnDecode() (callbacks Callbacks) {
return q.ondecode return q.ondecode
} }
// OnClose callback is called after the mongox ends a loading procedure
func (q *Query) OnClose() (callbacks Callbacks) { func (q *Query) OnClose() (callbacks Callbacks) {
return q.onclose return q.onclose
} }

Loading…
Cancel
Save