[smuxi] Engine: no need to select the ID column in SqliteMessageBuffer.GetRange()



commit 0a957c347783f706cda115c3d73e6c44b394f40f
Author: Mirco Bauer <meebey meebey net>
Date:   Wed Feb 26 22:45:05 2014 +0100

    Engine: no need to select the ID column in SqliteMessageBuffer.GetRange()

 src/Engine/MessageBuffers/SqliteMessageBuffer.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Engine/MessageBuffers/SqliteMessageBuffer.cs 
b/src/Engine/MessageBuffers/SqliteMessageBuffer.cs
index 497d021..c377f04 100644
--- a/src/Engine/MessageBuffers/SqliteMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/SqliteMessageBuffer.cs
@@ -99,9 +99,10 @@ namespace Smuxi.Engine
         public override IList<MessageModel> GetRange(int offset, int limit)
         {
             using (var cmd = Connection.CreateCommand()) {
-                cmd.CommandText = "SELECT ID, JSON FROM Messages " +
-                                  " ORDER BY ID" +
-                                  " LIMIT @limit OFFSET @offset ";
+                cmd.CommandText = "SELECT JSON FROM Messages " +
+                                  " ORDER BY ID " +
+                                  " LIMIT @limit OFFSET @offset";
+
                 var param = cmd.CreateParameter();
                 param.ParameterName = "offset";
                 param.Value = offset.ToString();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]