diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-29 14:47:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-29 14:47:45 -0500 |
| commit | 8c2095b24ee3228c0e112ebc3cfcb73e146d2a78 (patch) | |
| tree | 6a83c8132f9eac18c0a0bc2461e191c5c725c3c1 /Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | |
| parent | 1d09262963fb1d09f3a04843922a6a7a2f4364b3 (diff) | |
| parent | 456d5e5b760abe46c8dedf08b2465d2bd3ced4af (diff) | |
Merge pull request #2317 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs b/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs index 66ef5d5d1..767ba5504 100644 --- a/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs +++ b/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs @@ -29,12 +29,7 @@ namespace Emby.Server.Implementations.Notifications { using (var connection = CreateConnection()) { - connection.ExecuteAll(string.Join(";", new[] - { - "PRAGMA page_size=4096", - "pragma default_temp_store = memory", - "pragma temp_store = memory" - })); + RunDefaultInitialization(connection); string[] queries = { @@ -58,7 +53,7 @@ namespace Emby.Server.Implementations.Notifications using (var connection = CreateConnection(true)) { - //using (WriteLock.Read()) + using (WriteLock.Read()) { var clauses = new List<string>(); var paramList = new List<object>(); @@ -113,7 +108,7 @@ namespace Emby.Server.Implementations.Notifications using (var connection = CreateConnection(true)) { - //using (WriteLock.Read()) + using (WriteLock.Read()) { using (var statement = connection.PrepareStatement("select Level from Notifications where UserId=@UserId and IsRead=@IsRead")) { @@ -249,7 +244,7 @@ namespace Emby.Server.Implementations.Notifications statement.MoveNext(); } - }); + }, TransactionMode); } } } @@ -304,7 +299,7 @@ namespace Emby.Server.Implementations.Notifications statement.MoveNext(); } - }); + }, TransactionMode); } } } @@ -334,7 +329,7 @@ namespace Emby.Server.Implementations.Notifications } } - }); + }, TransactionMode); } } } |
