aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-21 11:52:59 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-21 11:52:59 -0400
commite01202030dcd16cd9c7c3327b4e411be7de02614 (patch)
tree1f905a3471d6e2f9f6e241f491da5c51f2021e47 /MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs
parent8682ee30dd8d1d654c79467bd5c0939c7339f214 (diff)
removed sql delayed writer in favor of prepared statements
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs18
1 files changed, 3 insertions, 15 deletions
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
@@ -34,18 +34,6 @@ namespace MediaBrowser.Server.Implementations.Sqlite
}
/// <summary>
- /// Gets a value indicating whether [enable delayed commands].
- /// </summary>
- /// <value><c>true</c> if [enable delayed commands]; otherwise, <c>false</c>.</value>
- protected override bool EnableDelayedCommands
- {
- get
- {
- return false;
- }
- }
-
- /// <summary>
/// The _json serializer
/// </summary>
private readonly IJsonSerializer _jsonSerializer;
@@ -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);