Add the sqlite3_expanded_sql() interface. Refinements to the

sqlite3_trace_v2() interface to make it more useful.

FossilOrigin-Name: 99ee7ee58d45b29a0000492306ddc0b90563ff51
This commit is contained in:
drh
2016-07-14 01:09:08 +00:00
parent 1637a5171f
commit fca760c841
11 changed files with 112 additions and 72 deletions
+15
View File
@@ -72,6 +72,21 @@ const char *sqlite3_sql(sqlite3_stmt *pStmt){
return p ? p->zSql : 0;
}
/*
** Return the SQL associated with a prepared statement with
** bound parameters expanded. Space to hold the returned string is
** obtained from sqlite3_malloc(). The caller is responsible for
** freeing the returned string by passing it to sqlite3_free().
**
** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
** expanded bound parameters.
*/
char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){
Vdbe *p = (Vdbe *)pStmt;
return p ? sqlite3VdbeExpandSql(p, p->zSql) : 0;
if( p->zSql==0 ) return 0;
}
/*
** Swap all content between two VDBE structures.
*/