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/SQLiteUserRepository.cs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs') diff --git a/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs b/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs index eb5868932..baaf9d956 100644 --- a/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs +++ b/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs @@ -45,18 +45,6 @@ namespace MediaBrowser.Server.Implementations.Sqlite /// private readonly IApplicationPaths _appPaths; - /// - /// Gets a value indicating whether [enable delayed commands]. - /// - /// true if [enable delayed commands]; otherwise, false. - protected override bool EnableDelayedCommands - { - get - { - return false; - } - } - /// /// Initializes a new instance of the class. /// @@ -127,13 +115,13 @@ namespace MediaBrowser.Server.Implementations.Sqlite cancellationToken.ThrowIfCancellationRequested(); - using (var cmd = connection.CreateCommand()) + using (var cmd = Connection.CreateCommand()) { cmd.CommandText = "replace into users (guid, data) values (@1, @2)"; cmd.AddParam("@1", user.Id); cmd.AddParam("@2", serialized); - using (var tran = connection.BeginTransaction()) + using (var tran = Connection.BeginTransaction()) { try { @@ -162,7 +150,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite /// IEnumerable{User}. public IEnumerable RetrieveAllUsers() { - using (var cmd = connection.CreateCommand()) + using (var cmd = Connection.CreateCommand()) { cmd.CommandText = "select data from users"; @@ -201,7 +189,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite cancellationToken.ThrowIfCancellationRequested(); - using (var cmd = connection.CreateCommand()) + using (var cmd = Connection.CreateCommand()) { cmd.CommandText = "delete from users where guid=@guid"; var guidParam = cmd.Parameters.Add("@guid", DbType.Guid); -- cgit v1.2.3