Set journal_size_limit

This commit is contained in:
Bond_009 2023-01-10 22:29:05 +01:00
parent 73740f6c6e
commit 6a8d24d9e9

View File

@ -71,6 +71,12 @@ namespace Emby.Server.Implementations.Data
/// <value>The journal mode.</value>
protected virtual string JournalMode => "WAL";
/// <summary>
/// Gets the journal size limit. <see href="https://www.sqlite.org/pragma.html#pragma_journal_size_limit" />.
/// </summary>
/// <value>The journal size limit.</value>
protected virtual int? JournalSizeLimit => 0;
/// <summary>
/// Gets the page size.
/// </summary>
@ -131,6 +137,11 @@ namespace Emby.Server.Implementations.Data
WriteConnection.Execute("PRAGMA journal_mode=" + JournalMode);
}
if (JournalSizeLimit.HasValue)
{
WriteConnection.Execute("PRAGMA journal_size_limit=" + (int)JournalSizeLimit.Value);
}
if (Synchronous.HasValue)
{
WriteConnection.Execute("PRAGMA synchronous=" + (int)Synchronous.Value);