** Create a prepared statement using printf-style arguments for the SQL. */
| 26973 | ** Create a prepared statement using printf-style arguments for the SQL. |
| 26974 | */ |
| 26975 | static void shellPreparePrintf( |
| 26976 | sqlite3 *db, |
| 26977 | int *pRc, |
| 26978 | sqlite3_stmt **ppStmt, |
| 26979 | const char *zFmt, |
| 26980 | ... |
| 26981 | ){ |
| 26982 | *ppStmt = 0; |
| 26983 | if( *pRc==SQLITE_OK ){ |
| 26984 | va_list ap; |
| 26985 | char *z; |
| 26986 | va_start(ap, zFmt); |
| 26987 | z = sqlite3_vmprintf(zFmt, ap); |
| 26988 | va_end(ap); |
| 26989 | if( z==0 ){ |
| 26990 | *pRc = SQLITE_NOMEM; |
| 26991 | }else{ |
| 26992 | shellPrepare(db, pRc, z, ppStmt); |
| 26993 | sqlite3_free(z); |
| 26994 | } |
| 26995 | } |
| 26996 | } |
| 26997 | |
| 26998 | /* |
| 26999 | ** Finalize the prepared statement created using shellPreparePrintf(). |
no test coverage detected