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

Function find_column_name

db/db_sqlite3.c:447–459  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

445
446/* Returns NULL if this doesn't look like a column definition */
447static const char *find_column_name(const tal_t *ctx,
448 const char *sqlpart,
449 size_t *after)
450{
451 size_t start = 0;
452
453 while (cisspace(sqlpart[start]))
454 start++;
455 *after = strspn(sqlpart + start, "abcdefghijklmnopqrstuvwxyz_0123456789") + start;
456 if (*after == start || !cisspace(sqlpart[*after]))
457 return NULL;
458 return tal_strndup(ctx, sqlpart + start, *after - start);
459}
460
461/* Move table out the way, return columns.
462 * 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