149
149
explicit connection_c(drizzle_c& drizzle)
151
drizzle_con_create(drizzle, *this);
151
b_= drizzle_con_create(drizzle);
155
throw "drizzle_con_create() failed";
152
157
read_conf_files();
157
drizzle_con_free(*this);
162
drizzle_con_free(b_);
160
165
operator drizzle_con_st*()
165
170
const char* error()
167
return drizzle_con_error(*this);
172
return drizzle_con_error(b_);
170
175
void set_tcp(const char* host, in_port_t port)
172
drizzle_con_set_tcp(*this, host, port);
177
drizzle_con_set_tcp(b_, host, port);
175
180
void set_auth(const char* user, const char* password)
177
drizzle_con_set_auth(*this, user, password);
182
drizzle_con_set_auth(b_, user, password);
180
185
void set_db(const char* db)
182
drizzle_con_set_db(*this, db);
187
drizzle_con_set_db(b_, db);
185
190
drizzle_return_t query(result_c& result, const char* str, size_t str_size)
187
192
drizzle_return_t ret;
188
194
drizzle_query(*this, result, str, str_size, &ret);
190
198
ret = drizzle_result_buffer(result);