From e01202030dcd16cd9c7c3327b4e411be7de02614 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 21 May 2013 11:52:59 -0400 Subject: removed sql delayed writer in favor of prepared statements --- .../Sqlite/SQLiteDisplayPreferencesRepository.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs') diff --git a/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs b/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs index 93bb174c6..93b246380 100644 --- a/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs +++ b/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs @@ -33,18 +33,6 @@ namespace MediaBrowser.Server.Implementations.Sqlite } } - /// - /// Gets a value indicating whether [enable delayed commands]. - /// - /// true if [enable delayed commands]; otherwise, false. - protected override bool EnableDelayedCommands - { - get - { - return false; - } - } - /// /// The _json serializer /// @@ -132,13 +120,13 @@ namespace MediaBrowser.Server.Implementations.Sqlite cancellationToken.ThrowIfCancellationRequested(); - using (var cmd = connection.CreateCommand()) + using (var cmd = Connection.CreateCommand()) { cmd.CommandText = "replace into displaypreferences (id, data) values (@1, @2)"; cmd.AddParam("@1", displayPreferences.Id); cmd.AddParam("@2", serialized); - using (var tran = connection.BeginTransaction()) + using (var tran = Connection.BeginTransaction()) { try { @@ -174,7 +162,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite throw new ArgumentNullException("displayPreferencesId"); } - var cmd = connection.CreateCommand(); + var cmd = Connection.CreateCommand(); cmd.CommandText = "select data from displaypreferences where id = @id"; var idParam = cmd.Parameters.Add("@id", DbType.Guid); -- cgit v1.2.3