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

Function sqlv_on_word

internal/cbm/sql_values.c:381–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379} sqlv_stmt_t;
380
381static void sqlv_on_word(sqlv_scan_t *sc, sqlv_stmt_t *st, sqlv_ranges_t *ex) {
382 const char *w = sc->s + sc->i;
383 uint32_t n = 0;
384 while (sc->i < sc->len && sqlv_word_char(sc->s[sc->i])) {
385 sqlv_step(sc);
386 n++;
387 }
388 if (!st->started) {
389 st->started = true;
390 st->insert = sqlv_word_is(w, n, "INSERT") || sqlv_word_is(w, n, "REPLACE");
391 } else if (st->insert && st->depth == 0 &&
392 (sqlv_word_is(w, n, "VALUES") || sqlv_word_is(w, n, "VALUE"))) {
393 sqlv_handle_values(sc, ex);
394 }
395}
396
397static void sqlv_scan_file(sqlv_scan_t *sc, sqlv_ranges_t *ex) {
398 sqlv_stmt_t st = {false, false, 0};

Callers 1

sqlv_scan_fileFunction · 0.85

Calls 4

sqlv_word_charFunction · 0.85
sqlv_stepFunction · 0.85
sqlv_word_isFunction · 0.85
sqlv_handle_valuesFunction · 0.85

Tested by

no test coverage detected