SQLite

Check-in [409535e6df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add requirements marks to the sqlite3_expanded_sql() documentation.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sqlite3_trace_v2
Files: files | file ages | folders
SHA1: 409535e6dfc307f26ea3d9f51be51c439b6d7b22
User & Date: drh 2016-07-22 20:20:53.758
Context
2016-07-22
20:45
Be sure to hold the database connection mutex while calling sqlite3VdbeExpand() from within sqlite3_expanded_sql(). (check-in: 527b5ba68c user: drh tags: sqlite3_trace_v2)
20:20
Add requirements marks to the sqlite3_expanded_sql() documentation. (check-in: 409535e6df user: drh tags: sqlite3_trace_v2)
2016-07-15
10:01
The sqlite3_expanded_sql() function compiles, but always returns NULL, when the SQLITE_OMIT_TRACE compile-time option is used. (check-in: 53c25ebe34 user: drh tags: sqlite3_trace_v2)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/sqlite.h.in.
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8
** SQL text used to create [prepared statement] P if P was
** created by either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
** string containing the SQL text of prepared statement P with
** [bound parameters] expanded.
**
** For example, if a prepared statement is created using the SQL
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
** and parameter :xyz is unbound, then sqlite3_sql() will return
** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql()
** will return "SELECT 2345,NULL".
**
** The [SQLITE_TRACE_SIZE_LIMIT] setting limits the size of a 
** bound parameter expansion.  If SQLite is built with the
** [SQLITE_OMIT_TRACE] compile-time option then the sqlite3_expanded_sql()
** interface is non-functional and always returns NULL.
**
** ^The string returned by sqlite3_sql(P) is managed by SQLite and is
** automatically freed when the prepared statement is finalized.
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
** is obtained from [sqlite3_malloc()] and must be free by the application







|



|

|
|







3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8
** SQL text used to create [prepared statement] P if P was
** created by either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
** string containing the SQL text of prepared statement P with
** [bound parameters] expanded.
**
** ^(For example, if a prepared statement is created using the SQL
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
** and parameter :xyz is unbound, then sqlite3_sql() will return
** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql()
** will return "SELECT 2345,NULL".)^
**
** ^The [SQLITE_TRACE_SIZE_LIMIT] setting limits the size of a 
** bound parameter expansion.  ^If SQLite is built with the
** [SQLITE_OMIT_TRACE] compile-time option then the sqlite3_expanded_sql()
** interface is non-functional and always returns NULL.
**
** ^The string returned by sqlite3_sql(P) is managed by SQLite and is
** automatically freed when the prepared statement is finalized.
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
** is obtained from [sqlite3_malloc()] and must be free by the application