예제 #1
0
// Value returns the current value of the cursor.
func (cur *Cursor) Value() []byte {
	size := C.int(C.sp_valuesize(cur.Pointer))
	if 0 == size {
		fmt.Println("Value is 0 len")
		return nil
	}
	return C.GoBytes(unsafe.Pointer(C.sp_value(cur.Pointer)), size)
}
예제 #2
0
// ValueSize returns the length of the current value.
func (cur *Cursor) ValueSize() int {
	return int(C.sp_valuesize(cur.Pointer))
}