func (iter *Iterator) SeekToLast() {
	C.rocksdb_iter_seek_to_last(iter.it)
}
SeekToLast moves the iterator to the last key in the database.
The iterator is Valid() after this call if the source is not empty.
package rocksdb
import "C"
import (
	"bytes"
	"errors"
	"unsafe"
)
type Iterator struct {
	it *C.rocksdb_iterator_t
}
func NewNativeIterator(c unsafe.Pointer) *Iterator {
	return &Iterator{it: (*C.rocksdb_iterator_t)(c)}
}
func (iter *Iterator) Valid() bool {
	return C.rocksdb_iter_valid(iter.it) != 0
}
func (iter *Iterator) ValidForPrefix(prefix []byte) bool {
	if C.rocksdb_iter_valid(iter.it) == 0 {
		return false
	}
	keySlice := iter.Key()
	result := bytes.HasPrefix(keySlice.Data(), prefix)
	keySlice.Free()
	return result
}
func (iter *Iterator) Key() *Slice {
	var cLen C.size_t
	cKey := C.rocksdb_iter_key(iter.it, &cLen)
	if cKey == nil {
		return nil
	}
	return &Slice{cKey, cLen, true}
}
func (iter *Iterator) Value() *Slice {
	var cLen C.size_t
	cVal := C.rocksdb_iter_value(iter.it, &cLen)
	if cVal == nil {
		return nil
	}
	return &Slice{cVal, cLen, true}
}
func (iter *Iterator) Next() {
	C.rocksdb_iter_next(iter.it)
}
func (iter *Iterator) Prev() {
	C.rocksdb_iter_prev(iter.it)
}
func (iter *Iterator) SeekToFirst() {
	C.rocksdb_iter_seek_to_first(iter.it)
}