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

Function var_capacity_error

src/cypher/cypher.c:6393–6400  ·  view source on GitHub ↗

Says which limit the query passed and how to get under it. An unnamed node * takes no slot — except the head of the first pattern, which the engine binds * either way — so dropping a name the query never uses is the cheap way out. * Splitting the MATCH is NOT — every pattern of one query shares one binding, * which is why the caller counts across all of them. Separate queries do work, * becau

Source from the content-addressed store, hash-verified

6391 * which is why the caller counts across all of them. Separate queries do work,
6392 * because each gets a binding of its own. */
6393static char *var_capacity_error(const char *kind, int limit) {
6394 char buf[CBM_SZ_256];
6395 snprintf(buf, sizeof(buf),
6396 "too many %s variables: a query can name at most %d — "
6397 "leave the name off the ones you do not use, or run separate queries",
6398 kind, limit);
6399 return heap_strdup(buf);
6400}
6401
6402/* A binding holds a fixed number of variables: CYP_MAX_VARS node variables and
6403 * CYP_MAX_EDGE_VARS edge variables, both in plain arrays (see binding_t).

Callers 1

Calls 1

heap_strdupFunction · 0.70

Tested by

no test coverage detected