Wrapper for sqlGenericQuery() using variable number of args. * This is what you want when doing SELECT queries that return a * single row. This function will care to also call sqlNextRow() for * you in case the return value is SQLITE_ROW. */
| 206 | * single row. This function will care to also call sqlNextRow() for |
| 207 | * you in case the return value is SQLITE_ROW. */ |
| 208 | int sqlSelectOneRow(sqlite3 *dbhandle, sqlRow *row, const char *sql, ...) { |
| 209 | va_list ap; |
| 210 | va_start(ap,sql); |
| 211 | int rc = sqlGenericQuery(dbhandle,row,sql,ap); |
| 212 | if (rc == SQLITE_ROW) sqlNextRow(row); |
| 213 | va_end(ap); |
| 214 | return rc; |
| 215 | } |
| 216 | |
| 217 | /* Wrapper for sqlGenericQuery() to do a SELECT and return directly |
| 218 | * the integer of the first row, or zero on error. */ |
nothing calls this directly
no test coverage detected