MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / tables_generator

Function tables_generator

tools/cdb2sql/cdb2sql.cpp:400–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400static char *tables_generator(const char *text, const int state)
401{
402 char sql[256];
403 if (*text)
404 //TODO: escape text
405 snprintf(sql, sizeof(sql),
406 "SELECT tablename FROM comdb2_tables "
407 "WHERE tablename LIKE '%s%%'",
408 text);
409 else
410 snprintf(sql, sizeof(sql), "SELECT tablename FROM comdb2_tables");
411
412 return db_generator(state, sql);
413}
414
415static char *generic_generator_no_systables(const char *text, const int state)
416{

Callers

nothing calls this directly

Calls 1

db_generatorFunction · 0.85

Tested by

no test coverage detected