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

Function sqlv_scan_tuple

internal/cbm/sql_values.c:284–308  ·  view source on GitHub ↗

Consume one tuple starting at its '('. *literal says whether every value in * it was a plain literal. Returns false if the tuple never closes. */

Source from the content-addressed store, hash-verified

282/* Consume one tuple starting at its '('. *literal says whether every value in
283 * it was a plain literal. Returns false if the tuple never closes. */
284static bool sqlv_scan_tuple(sqlv_scan_t *sc, bool *literal) {
285 sqlv_step(sc);
286 sqlv_skip_trivia(sc, NULL);
287 if (sqlv_at(sc, 0) == ')') {
288 sqlv_step(sc);
289 *literal = true;
290 return true;
291 }
292 while (sqlv_read_literal(sc)) {
293 sqlv_skip_trivia(sc, NULL);
294 char c = sqlv_at(sc, 0);
295 if (c == ')') {
296 sqlv_step(sc);
297 *literal = true;
298 return true;
299 }
300 if (c != ',') {
301 break;
302 }
303 sqlv_step(sc);
304 sqlv_skip_trivia(sc, NULL);
305 }
306 *literal = false;
307 return sqlv_skip_balanced(sc);
308}
309
310static void sqlv_push(sqlv_ranges_t *r, TSRange range) {
311 if (r->failed) {

Callers 1

sqlv_handle_valuesFunction · 0.85

Calls 5

sqlv_stepFunction · 0.85
sqlv_skip_triviaFunction · 0.85
sqlv_atFunction · 0.85
sqlv_read_literalFunction · 0.85
sqlv_skip_balancedFunction · 0.85

Tested by

no test coverage detected