[chronojump] SqliteJumpRj.Select implements limit and personNameInComments
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] SqliteJumpRj.Select implements limit and personNameInComments
- Date: Mon, 6 Sep 2021 12:32:45 +0000 (UTC)
commit 7b5b41bc9a80f80bab0bc4ad08a4028c08608f15
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Sep 6 14:32:07 2021 +0200
SqliteJumpRj.Select implements limit and personNameInComments
src/gui/app1/jumpsRjFatigue.cs | 2 +-
src/sqlite/jumpRj.cs | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/app1/jumpsRjFatigue.cs b/src/gui/app1/jumpsRjFatigue.cs
index 5ed3a884e..dd584ebc0 100644
--- a/src/gui/app1/jumpsRjFatigue.cs
+++ b/src/gui/app1/jumpsRjFatigue.cs
@@ -132,7 +132,7 @@ public partial class ChronoJumpWindow
return types;
List <JumpRj> jrj_l = SqliteJumpRj.SelectJumps (false, currentSession.UniqueID,
currentPerson.UniqueID,
- comboSelectJumpsRjFatigue.GetSelectedNameEnglish());
+ comboSelectJumpsRjFatigue.GetSelectedNameEnglish(), -1, false);
int count = 1;
foreach(JumpRj jrj in jrj_l)
diff --git a/src/sqlite/jumpRj.cs b/src/sqlite/jumpRj.cs
index 19ba6dfab..246ea2986 100644
--- a/src/sqlite/jumpRj.cs
+++ b/src/sqlite/jumpRj.cs
@@ -95,7 +95,7 @@ class SqliteJumpRj : SqliteJump
return myLast;
}
- public static List<JumpRj> SelectJumps (bool dbconOpened, int sessionID, int personID, string
filterType)
+ public static List<JumpRj> SelectJumps (bool dbconOpened, int sessionID, int personID, string
filterType, int limit, bool personNameInComment)
{
if(! dbconOpened)
Sqlite.Open();
@@ -134,10 +134,15 @@ class SqliteJumpRj : SqliteJump
sep = " AND ";
}
+ string limitString = "";
+ if(limit != -1)
+ limitString = " LIMIT " + limit;
+
dbcmd.CommandText = "SELECT * FROM jumpRj" +
filterSessionString +
filterPersonString +
- filterTypeString;
+ filterTypeString +
+ limitString;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]