package nosqldb_sdk import ( "C" ) import ( "nosql_db_sdk_ffi/util/ptrproxy" "unsafe" "github.com/oracle/nosql-go-sdk/nosqldb" ) //export ffi_nosqldb_get_result_value_as_json func ffi_nosqldb_get_result_value_as_json(unsafe_nosqldb_get_result_ptr NosqldbGetResult) (*C.char, Error) { nosqldb_get_result_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_get_result_ptr)) if !ok { return nil, C.CString("NosqldbGetResultPtr cannot deref") } get_result := (*nosqldb.GetResult)(nosqldb_get_result_ptr) return C.CString(get_result.ValueAsJSON()), nil } //export ffi_nosqldb_get_result_row_exists func ffi_nosqldb_get_result_row_exists(unsafe_nosqldb_get_result_ptr NosqldbGetResult) (bool, Error) { nosqldb_get_result_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_get_result_ptr)) if !ok { return false, C.CString("NosqldbGetResultPtr cannot deref") } get_result := (*nosqldb.GetResult)(nosqldb_get_result_ptr) return get_result.RowExists(), nil }