mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Add Statement::getExtendedSQL()
- it returns a UTF-8 string containing the SQL text of prepared statement with bound parameters expanded
This commit is contained in:
parent
81913790f2
commit
ce45099695
@ -608,6 +608,10 @@ public:
|
||||
{
|
||||
return mQuery;
|
||||
}
|
||||
|
||||
// Return a UTF-8 string containing the SQL text of prepared statement with bound parameters expanded.
|
||||
std::string getExtendedSQL();
|
||||
|
||||
/// Return the number of columns in the result set returned by the prepared statement
|
||||
inline int getColumnCount() const
|
||||
{
|
||||
|
@ -401,17 +401,24 @@ int Statement::getErrorCode() const noexcept // nothrow
|
||||
{
|
||||
return sqlite3_errcode(mStmtPtr);
|
||||
}
|
||||
|
||||
// Return the extended numeric result code for the most recent failed API call (if any).
|
||||
int Statement::getExtendedErrorCode() const noexcept // nothrow
|
||||
{
|
||||
return sqlite3_extended_errcode(mStmtPtr);
|
||||
}
|
||||
|
||||
// Return UTF-8 encoded English language explanation of the most recent failed API call (if any).
|
||||
const char* Statement::getErrorMsg() const noexcept // nothrow
|
||||
{
|
||||
return sqlite3_errmsg(mStmtPtr);
|
||||
}
|
||||
|
||||
// Return a UTF-8 string containing the SQL text of prepared statement with bound parameters expanded.
|
||||
std::string Statement::getExtendedSQL() {
|
||||
return sqlite3_expanded_sql(mStmtPtr);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal class : shared pointer to the sqlite3_stmt SQLite Statement Object
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user