| 398 | } |
| 399 | |
| 400 | static 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 | |
| 415 | static char *generic_generator_no_systables(const char *text, const int state) |
| 416 | { |
nothing calls this directly
no test coverage detected