func (iter *Iterator) Next() bool {
	if iter.pos >= iter.endPos {
		return false
	}

	keyLength, valueLength, err := readTuple(iter.db.reader, iter.pos)
	if err != nil {
		iter.err = err
		return false
	}

	buf := make([]byte, keyLength+valueLength)
	_, err = iter.db.reader.ReadAt(buf, int64(iter.pos+16))
	if err != nil {
		iter.err = err
		return false
	}

	// Update iterator state
	iter.key = buf[:keyLength]
	iter.value = buf[keyLength:]
	iter.pos += 16 + keyLength + valueLength

	return true
}
// Next reads the next key/value pair and advances the iterator one record.
// It returns false when the scan stops, either by reaching the end of the
// database or an error. After Next returns false, the Err method will return
// any error that occurred while iterating.
Next reads the next key/value pair and advances the iterator one record.
It returns false when the scan stops, either by reaching the end of the
database or an error. After Next returns false, the Err method will return
any error that occurred while iterating.
// Next reads the next key / value pair and advances the iterator one record . // It returns false when the scan stops either by reaching the end of the // database or an error . After Next returns false the Err method will return // any error that occurred while iterating .
func (iter *Iterator) Next() bool {
	if iter.pos >= iter.endPos {
		return false
	}
	keyLength, valueLength, err := readTuple(iter.db.reader, iter.pos)
	if err != nil {
		iter.err = err
		return false
	}
	buf := make([]byte, keyLength+valueLength)
	_, err = iter.db.reader.ReadAt(buf, int64(iter.pos+16))
	if err != nil {
		iter.err = err
		return false
	}
	iter.key = buf[:keyLength]
	iter.value = buf[keyLength:]
	iter.pos += 16 + keyLength + valueLength
	return true
}
func ( iter * Iterator ) Next ( ) bool { if iter . pos >= iter . endPos { return false } keyLength , valueLength , err := readTuple ( iter . db . reader , iter . pos ) if err != nil { iter . err = err return false } buf := make ( [ ] byte , keyLength + valueLength ) _ , err = iter . db . reader . ReadAt ( buf , int64 ( iter . pos + 16 ) ) if err != nil { iter . err = err return false } iter . key = buf [ : keyLength ] iter . value = buf [ keyLength : ] iter . pos += 16 + keyLength + valueLength return true }
Next reads the next key/value pair and advances the iterator one record.
Next reads the next key / value pair and advances the iterator one record .
// Update iterator state