MCPcopy Create free account
hub / github.com/ElementsProject/lightning / find_column_name

Function find_column_name

db/db_sqlite3.c:452–464  ·  view source on GitHub ↗

Returns NULL if this doesn't look like a column definition */

Source from the content-addressed store, hash-verified

450
451/* Returns NULL if this doesn't look like a column definition */
452static const char *find_column_name(const tal_t *ctx,
453 const char *sqlpart,
454 size_t *after)
455{
456 size_t start = 0;
457
458 while (isspace(sqlpart[start]))
459 start++;
460 *after = strspn(sqlpart + start, "abcdefghijklmnopqrstuvwxyz_0123456789") + start;
461 if (*after == start || !cisspace(sqlpart[*after]))
462 return NULL;
463 return tal_strndup(ctx, sqlpart + start, *after - start);
464}
465
466/* Move table out the way, return columns.
467 * Note: with db_hook, frees tmpctx! */

Callers 2

db_sqlite3_rename_columnFunction · 0.85

Calls 1

cisspaceFunction · 0.85

Tested by

no test coverage detected