MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_query_free

Function cbm_query_free

src/cypher/cypher.c:1994–2011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1992}
1993
1994void cbm_query_free(cbm_query_t *q) {
1995 while (q) {
1996 cbm_query_t *next = q->union_next;
1997 for (int i = 0; i < q->pattern_count; i++) {
1998 free_pattern(&q->patterns[i]);
1999 }
2000 free(q->patterns);
2001 free(q->pattern_optional);
2002 free_where(q->where);
2003 free_where(q->post_with_where);
2004 free_return_clause(q->with_clause);
2005 free_return_clause(q->ret);
2006 safe_str_free(&q->unwind_expr);
2007 safe_str_free(&q->unwind_alias);
2008 free(q);
2009 q = next;
2010 }
2011}
2012
2013/* ── Convenience: lex + parse ───────────────────────────────────── */
2014

Callers 4

cbm_parseFunction · 0.85
cbm_parse_freeFunction · 0.85
cbm_cypher_executeFunction · 0.85
test_cypher.cFile · 0.85

Calls 4

free_patternFunction · 0.85
free_whereFunction · 0.85
free_return_clauseFunction · 0.85
safe_str_freeFunction · 0.85

Tested by

no test coverage detected