package nosqldb_sdk import ( "C" ) import ( "nosql_db_sdk_ffi/util/ptrproxy" "strings" "unsafe" "github.com/oracle/nosql-go-sdk/nosqldb" ) //export ffi_nosqldb_prepare_request_new func ffi_nosqldb_prepare_request_new() NosqldbPrepareRequest { preprq := nosqldb.PrepareRequest{} return NosqldbPrepareRequest(ptrproxy.Ref(unsafe.Pointer(&preprq))) } //export ffi_nosqldb_prepare_request_set_statement func ffi_nosqldb_prepare_request_set_statement(unsafe_nosqldb_prepare_request_ptr NosqldbPrepareRequest, stmt string) Error { nosqldb_prepare_request_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_prepare_request_ptr)) if !ok { return C.CString("NosqldbPrepareRequestPtr cannot deref") } prepare_request := (*nosqldb.PrepareRequest)(nosqldb_prepare_request_ptr) prepare_request.Statement = strings.Clone(stmt) return nil }