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

Function cbm_query_free

src/cypher/cypher.c:2206–2223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2204}
2205
2206void cbm_query_free(cbm_query_t *q) {
2207 while (q) {
2208 cbm_query_t *next = q->union_next;
2209 for (int i = 0; i < q->pattern_count; i++) {
2210 free_pattern(&q->patterns[i]);
2211 }
2212 free(q->patterns);
2213 free(q->pattern_optional);
2214 free_where(q->where);
2215 free_where(q->post_with_where);
2216 free_return_clause(q->with_clause);
2217 free_return_clause(q->ret);
2218 safe_str_free(&q->unwind_expr);
2219 safe_str_free(&q->unwind_alias);
2220 free(q);
2221 q = next;
2222 }
2223}
2224
2225/* ── Convenience: lex + parse ───────────────────────────────────── */
2226

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