Wuping_Xin
(Wuping Xin)
September 6, 2020, 12:42pm
1
Can we add features to allow a(dvanced) user to specify LockingMode and SynchromousMode:
https://www.sqlite.org/pragma.html#pragma_locking_mode
https://www.sqlite.org/pragma.html#pragma_synchronous
Either add them to the existing Params property, or, add a NEW PRAGMAs property, so user can add SQLite pragmas to be executed at TSQLiteConnection.Create
.
Thank you.
wlandgraf
(Wagner Landgraf)
September 7, 2020, 12:53pm
2
You can simply execute them as SQL statements:
SharedCache false and LockingMode normal are the default values for SQLite and thus for TMS Aurelius native adapter. But all of them can be configured directly according to SQLite documentation. For LockingMode and Synchronous, for example, you can simply execute pragma statements directly:
var
Statement: IDBStatement;
begin
Statement := Connection.CreateStatement;
Statement.SetSQLCommand('pragma synchronous = normal');
Statement.Execute;
Statement := Connection.CreateStatement;
…