Commit c867021a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Hugo Beauzée-Luyssen

SqliteConnection: Simplify recursive_triggers accessor

We don't need to flush existing requests since we don't use
sqlite_prepare, but the v2 version of this API.
parent a0e1d482
Pipeline #8998 passed with stage
in 28 minutes and 12 seconds
......@@ -152,17 +152,7 @@ void Connection::setRecursiveTriggersEnabled( bool value )
// Ensure no request will run while we change this setting
auto ctx = acquireWriteContext();
// Changing the recursive_triggers setting affects the execution of all
// statements prepared using the database connection, including those
// prepared before the setting was changed. Any existing statements prepared
// using the legacy sqlite3_prepare() interface may fail with an
// SQLITE_SCHEMA error after the recursive_triggers setting is changed.
auto h = handle();
sqlite::Statement::FlushConnectionStatementCache( h );
setPragma( h, "recursive_triggers", value == true ? "1" : "0" );
setPragma( handle(), "recursive_triggers", value == true ? "1" : "0" );
void Connection::registerUpdateHook( const std::string& table, Connection::UpdateHookCb cb )
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