package nosqldb_sdk import ( "C" ) import ( "nosql_db_sdk_ffi/util/ptrproxy" "unsafe" "github.com/oracle/nosql-go-sdk/nosqldb" ) //export ffi_nosqldb_query_request_new func ffi_nosqldb_query_request_new() NosqldbQueryRequest { queryrq := nosqldb.QueryRequest{} return NosqldbQueryRequest(ptrproxy.Ref(unsafe.Pointer(&queryrq))) } //export ffi_nosqldb_query_request_set_prepared_statement func ffi_nosqldb_query_request_set_prepared_statement(unsafe_nosqldb_query_request_ptr NosqldbQueryRequest, unsafe_nosqldb_prepared_statement_ptr NosqldbPreparedStatement) Error { nosqldb_query_request_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_query_request_ptr)) if !ok { return C.CString("NosqldbQueryRequestPtr cannot deref") } query_request := (*nosqldb.QueryRequest)(nosqldb_query_request_ptr) nosqldb_prepared_statement_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_prepared_statement_ptr)) if !ok { return C.CString("NosqldbPreparedStatementPtr cannot deref") } query_request.PreparedStatement = (*nosqldb.PreparedStatement)(nosqldb_prepared_statement_ptr) return nil } //export ffi_nosqldb_query_request_is_done func ffi_nosqldb_query_request_is_done(unsafe_nosqldb_query_request_ptr NosqldbQueryRequest) (bool, Error) { nosqldb_query_request_ptr, ok := ptrproxy.Deref(unsafe.Pointer(unsafe_nosqldb_query_request_ptr)) if !ok { return false, C.CString("NosqldbQueryRequestPtr cannot deref") } query_request := (*nosqldb.QueryRequest)(nosqldb_query_request_ptr) return query_request.IsDone(), nil }