예제 #1
0
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;
}
예제 #2
0
파일: query.c 프로젝트: ezaze/youku
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;
}