aboutsummaryrefslogtreecommitdiff
path: root/src/sqlite.h.in
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-11-14 06:48:48 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-11-14 06:48:48 +0000
commitd0e2a85436a3d2eeafceae60d9c6ac6a73df86fe (patch)
tree42005f20ab1f5446da5cc0de89be88035c8f5ba3 /src/sqlite.h.in
parent8e556520e95efcd436b408f13738ce5460a72805 (diff)
downloadsqlite-d0e2a85436a3d2eeafceae60d9c6ac6a73df86fe.tar.gz
sqlite-d0e2a85436a3d2eeafceae60d9c6ac6a73df86fe.zip
Add an experimental API for retrieving the SQL source from a compiled statement: sqlite3_sql(). Ticket #2769. (CVS 4543)
FossilOrigin-Name: d31f1e0d74a871d66cf7d3ef35faae5171d5cbc3
Diffstat (limited to 'src/sqlite.h.in')
-rw-r--r--src/sqlite.h.in19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index cb1adf25e..a169b8c86 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -30,7 +30,7 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
-** @(#) $Id: sqlite.h.in,v 1.269 2007/11/05 17:54:17 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.270 2007/11/14 06:48:48 danielk1977 Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
@@ -1595,6 +1595,23 @@ int sqlite3_prepare16_v2(
);
/*
+** Retrieve the original SQL statement associated with a compiled statement
+** in UTF-8 encoding.
+**
+** If the compiled SQL statement passed as an argument was compiled using
+** either sqlite3_prepare_v2 or sqlite3_prepare16_v2, then this function
+** returns a pointer to a nul-terminated string containing a copy of
+** the original SQL statement. The pointer is valid until the statement
+** is deleted using sqlite3_finalize().
+**
+** If the statement was compiled using either of the legacy interfaces
+** sqlite3_prepare() or sqlite3_prepare16(), this function returns NULL.
+**
+****** EXPERIMENTAL - subject to change without notice **************
+*/
+const char *sqlite3_sql(sqlite3_stmt *pStmt);
+
+/*
** CAPI3REF: Dynamically Typed Value Object
**
** SQLite uses dynamic typing for the values it stores. Values can