Ejemplo n.º 1
0
void
close_query (query *q)
{
   if (q->error) {
    free_error(q->error);
   }

  if (q->select_query) {
    free_select_query(q->select_query);
    free(q->select_query);
  }

  if (q->drop_series_query) {
    free_drop_series_query(q->drop_series_query);
    free(q->drop_series_query);
  }

  if (q->drop_query) {
    free(q->drop_query);
  }

  if (q->delete_query) {
    free_delete_query(q->delete_query);
    free(q->delete_query);
  }
}
Ejemplo n.º 2
0
void
close_query (query *q)
{
  if (q->select_query) {
    free_select_query(q->select_query);
    free(q->select_query);
  }

  if (q->list_series_query) {
    if (q->list_series_query->has_regex)
      free_value(q->list_series_query->regex);
    free(q->list_series_query);
  }

  if (q->drop_series_query) {
    free_drop_series_query(q->drop_series_query);
    free(q->drop_series_query);
  }

  if (q->drop_query) {
    free(q->drop_query);
  }

  if (q->delete_query) {
    free_delete_query(q->delete_query);
    free(q->delete_query);
  }
}