package nosqldb_sdk import ( "C" ) import ( "nosql_db_sdk_ffi/util/ptrproxy" "strings" "unsafe" "github.com/oracle/nosql-go-sdk/nosqldb" "github.com/oracle/nosql-go-sdk/nosqldb/types" ) //export ffi_nosqldb_get_request_new func ffi_nosqldb_get_request_new() NosqldbGetRequest { gtrq := nosqldb.GetRequest{} return NosqldbGetRequest(ptrproxy.Ref(unsafe.Pointer(>rq))) } //export ffi_nosqldb_get_request_table_name_set func ffi_nosqldb_get_request_table_name_set(unsafe_nosqldb_get_request_ptr NosqldbGetRequest, TableName string) Error { nosqldb_get_request_table_name_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_get_request_ptr)) if !ok { return C.CString("NosqldbGetRequestPtr cannot deref") } get_request := (*nosqldb.GetRequest)(nosqldb_get_request_table_name_ptr) get_request.TableName = strings.Clone(TableName) return nil } //export ffi_nosqldb_get_request_key_set func ffi_nosqldb_get_request_key_set(unsafe_nosqldb_get_request_ptr NosqldbGetRequest, Key unsafe.Pointer) Error { nosqldb_get_request_key_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_get_request_ptr)) if !ok { return C.CString("NosqldbGetRequestPtr cannot deref") } get_request := (*nosqldb.GetRequest)(nosqldb_get_request_key_ptr) map_key_ptr, ok := ptrproxy.Move(unsafe.Pointer(Key)) if !ok { return C.CString("NosqldbGetRequestPtr cannot deref") } map_key := (*types.MapValue)(map_key_ptr) get_request.Key = map_key return nil }