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

Function sql_complexity_set

src/pipeline/pass_complexity.c:470–483  ·  view source on GitHub ↗

UDF: cbm_cx_set(properties, tld, recursive). */

Source from the content-addressed store, hash-verified

468
469/* UDF: cbm_cx_set(properties, tld, recursive). */
470static void sql_complexity_set(sqlite3_context *c, int argc, sqlite3_value **argv) {
471 if (argc != 3) {
472 sqlite3_result_error(c, "cbm_cx_set arity", -1);
473 return;
474 }
475 char *neu = complexity_set_props((const char *)sqlite3_value_text(argv[0]),
476 sqlite3_value_int(argv[1]), sqlite3_value_int(argv[2]) != 0);
477 if (!neu) {
478 sqlite3_result_error(c, "cbm_cx_set: malformed complexity properties", -1);
479 return;
480 }
481 sqlite3_result_text(c, neu, -1, SQLITE_TRANSIENT);
482 cbm_free(CBM_MEM_CLASS_OTHER, neu);
483}
484
485static bool tld_step_int64(sqlite3_stmt *st, int64_t *out) {
486 if (sqlite3_step(st) != SQLITE_ROW) {

Callers

nothing calls this directly

Calls 2

complexity_set_propsFunction · 0.85
cbm_freeFunction · 0.85

Tested by

no test coverage detected