VALUE rb_drizzle_query_set_con(VALUE self, VALUE con) { net_drizzle_query_st *context; net_drizzle_con_st *conn_st; Data_Get_Struct(self, net_drizzle_query_st, context); Data_Get_Struct(con, net_drizzle_con_st, conn_st); drizzle_query_set_con(context->query, conn_st->con); return self; }
drizzle_query_st *drizzle_query_add(drizzle_st *drizzle, drizzle_query_st *query, drizzle_con_st *con, drizzle_result_st *result, const char *query_string, size_t size, drizzle_query_options_t options, void *context) { query= drizzle_query_create(drizzle, query); if (query == NULL) return NULL; drizzle_query_set_con(query, con); drizzle_query_set_result(query, result); drizzle_query_set_string(query, query_string, size); drizzle_query_add_options(query, options); drizzle_query_set_context(query, context); return query; }