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_delete_request_new func ffi_nosqldb_delete_request_new() NosqldbDeleteRequest { dltrq := nosqldb.DeleteRequest{} return NosqldbDeleteRequest(ptrproxy.Ref(unsafe.Pointer(&dltrq))) } //export ffi_nosqldb_delete_request_table_name_set func ffi_nosqldb_delete_request_table_name_set(unsafe_nosqldb_delete_request_ptr NosqldbDeleteRequest, TableName string) Error { nosqldb_delete_request_table_name_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_delete_request_ptr)) if !ok { return C.CString("NosqldbDeleteRequestPtr cannot deref") } delete_request := (*nosqldb.DeleteRequest)(nosqldb_delete_request_table_name_ptr) delete_request.TableName = strings.Clone(TableName) return nil } //export ffi_nosqldb_delete_request_key_set func ffi_nosqldb_delete_request_key_set(unsafe_nosqldb_delete_request_ptr NosqldbDeleteRequest, Key unsafe.Pointer) Error { nosqldb_delete_request_key_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_delete_request_ptr)) if !ok { return C.CString("NosqldbdeleteRequestPtr cannot deref") } delete_request := (*nosqldb.DeleteRequest)(nosqldb_delete_request_key_ptr) map_key_ptr, ok := ptrproxy.Move(unsafe.Pointer(Key)) if !ok { return C.CString("NosqldbdeleteRequestPtr cannot deref") } map_key := (*types.MapValue)(map_key_ptr) delete_request.Key = map_key return nil }