| 301 | } |
| 302 | |
| 303 | func (it *iteratorNext) NextPath(ctx context.Context) bool { |
| 304 | if it.err != nil { |
| 305 | return false |
| 306 | } |
| 307 | if !it.query.nextPath { |
| 308 | return false |
| 309 | } |
| 310 | if !it.cursor.Next() { |
| 311 | it.err = it.cursor.Err() |
| 312 | it.cursor.Close() |
| 313 | return false |
| 314 | } |
| 315 | prev := it.res |
| 316 | if !it.scanValue(it.cursor) { |
| 317 | return false |
| 318 | } |
| 319 | if prev.Key() == it.res.Key() { |
| 320 | return true |
| 321 | } |
| 322 | // different main keys - return false, but keep this results for the Next |
| 323 | it.nextPathRes = it.res |
| 324 | it.nextPathTags = it.tags |
| 325 | it.res = nil |
| 326 | it.tags = nil |
| 327 | return false |
| 328 | } |
| 329 | |
| 330 | func (it *iteratorNext) Close() error { |
| 331 | if it.cursor != nil { |