Commit 5171b0a2 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

sqlite: Statement: Don't store the raw sql request

parent 03cc4e1f
......@@ -107,7 +107,6 @@ public:
sqlite3_reset( stmt );
})
, m_dbConn( dbConnection )
, m_req( req )
, m_bindIdx( 0 )
{
std::lock_guard<std::mutex> lock( StatementsCacheLock );
......@@ -151,9 +150,10 @@ public:
switch ( res )
{
case SQLITE_CONSTRAINT:
throw errors::ConstraintViolation( m_req, errMsg );
throw errors::ConstraintViolation( sqlite3_sql( m_stmt.get() ), errMsg );
default:
throw std::runtime_error( m_req + ": " + errMsg );
throw std::runtime_error( std::string{ sqlite3_sql( m_stmt.get() ) }
+ ": " + errMsg );
}
}
}
......@@ -183,7 +183,6 @@ private:
using StatementPtr = std::unique_ptr<sqlite3_stmt, void(*)(sqlite3_stmt*)>;
StatementPtr m_stmt;
SqliteConnection::Handle m_dbConn;
std::string m_req;
unsigned int m_bindIdx;
static std::mutex StatementsCacheLock;
static std::unordered_map<SqliteConnection::Handle,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment