[chronojump/database-refactoring: 3/5] Same as before.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/database-refactoring: 3/5] Same as before.
- Date: Mon, 12 Sep 2016 22:40:04 +0000 (UTC)
commit 2b982262d8b62f58602f610dc3c5da7288054bb4
Author: Carles Pina i Estany <carles pina cat>
Date: Mon Sep 12 19:27:35 2016 +0100
Same as before.
src/gui/evaluator.cs | 4 +-
src/gui/event.cs | 2 +-
src/gui/executeAuto.cs | 10 +-
src/gui/jump.cs | 24 ++--
src/gui/jumpType.cs | 6 +-
src/gui/person.cs | 62 +++++-----
src/gui/pulse.cs | 6 +-
src/gui/queryServer.cs | 16 ++--
src/gui/run.cs | 4 +-
src/gui/session.cs | 18 ++--
src/gui/stats.cs | 6 +-
src/gui/usefulObjects.cs | 52 +++++-----
src/oldCodeNeedToDBConvert/sqlite/person.cs | 4 +-
src/oldCodeNeedToDBConvert/sqlite/personSession.cs | 4 +-
src/oldCodeNeedToDBConvert/sqlite/session.cs | 2 +-
src/runType.cs | 4 +-
src/server.cs | 40 ++++----
src/session.cs | 2 +-
src/sqlite/country.cs | 14 +-
src/sqlite/encoder.cs | 64 ++++++------
src/sqlite/event.cs | 12 +-
src/sqlite/executeAuto.cs | 10 +-
src/sqlite/jump.cs | 32 +++---
src/sqlite/jumpRj.cs | 20 ++--
src/sqlite/jumpType.cs | 44 ++++----
src/sqlite/main.cs | 118 +++++++++++---------
src/sqlite/multiChronopic.cs | 20 ++--
src/sqlite/oldConvert.cs | 8 +-
src/sqlite/person.cs | 38 +++---
src/sqlite/personSession.cs | 48 ++++----
src/sqlite/personSessionNotUpload.cs | 12 +-
src/sqlite/preferences.cs | 16 ++--
src/sqlite/pulse.cs | 16 ++--
src/sqlite/pulseType.cs | 12 +-
src/sqlite/reactionTime.cs | 16 ++--
src/sqlite/run.cs | 20 ++--
src/sqlite/runInterval.cs | 16 ++--
src/sqlite/runType.cs | 80 +++++++-------
src/sqlite/server.cs | 72 ++++++------
src/sqlite/session.cs | 52 +++++-----
src/sqlite/speciallity.cs | 16 ++--
src/sqlite/sport.cs | 16 ++--
src/sqlite/stat.cs | 62 +++++-----
src/stats/jumpIndexes.cs | 8 +-
src/stats/rjIndex.cs | 8 +-
45 files changed, 566 insertions(+), 550 deletions(-)
---
diff --git a/src/gui/evaluator.cs b/src/gui/evaluator.cs
index 62e6da8..ab67b8b 100644
--- a/src/gui/evaluator.cs
+++ b/src/gui/evaluator.cs
@@ -221,7 +221,7 @@ public class EvaluatorWindow
else {
//get the active continent
string continentEnglish = Util.FindOnArray(':', 1, 0,
UtilGtk.ComboGetActive(combo_continents), continents);
- countries = SqliteCountry.SelectCountriesOfAContinent(continentEnglish, true); //put
undefined first
+ countries = SqliteGeneral.SqliteCountry.SelectCountriesOfAContinent(continentEnglish,
true); //put undefined first
//create countries translated, only with translated stuff
countriesTranslated = new String[countries.Length];
@@ -372,7 +372,7 @@ public class EvaluatorWindow
if(! creating) {
//country stuff
if(eval.CountryID != Constants.CountryUndefinedID) {
- string [] countryString = SqliteCountry.Select(eval.CountryID);
+ string [] countryString = SqliteGeneral.SqliteCountry.Select(eval.CountryID);
combo_continents.Active = UtilGtk.ComboMakeActive(continentsTranslated,
Catalog.GetString(countryString[3]));
combo_countries.Active = UtilGtk.ComboMakeActive(countriesTranslated,
diff --git a/src/gui/event.cs b/src/gui/event.cs
index bf15db5..bd6c53b 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -278,7 +278,7 @@ public class EditEventWindow
label_run_start_value.Hide();
}
- ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons(
+ ArrayList persons = SqliteGeneral.SqlitePersonSession.SelectCurrentSessionPersons(
myEvent.SessionID,
false); //means: do not returnPersonAndPSlist
string [] personsStrings = new String[persons.Count];
diff --git a/src/gui/executeAuto.cs b/src/gui/executeAuto.cs
index f0e9ce4..9b5d23c 100644
--- a/src/gui/executeAuto.cs
+++ b/src/gui/executeAuto.cs
@@ -152,7 +152,7 @@ public class ExecuteAutoWindow
label_tests_info.Visible = false;
label_series_info.Visible = false;
- jumpTypes = SqliteJumpType.SelectJumpTypes(false, "", "", false); //without alljumpsname,
without filter, not only name
+ jumpTypes = SqliteGeneral.SqliteJumpType.SelectJumpTypes(false, "", "", false); //without
alljumpsname, without filter, not only name
createTreeviewLoad();
fillTreeviewLoad();
@@ -201,7 +201,7 @@ public class ExecuteAutoWindow
}
private void fillTreeviewLoad() {
- List<ExecuteAutoSQL> sequences = SqliteExecuteAuto.Select(false, -1);
+ List<ExecuteAutoSQL> sequences = SqliteGeneral.SqliteExecuteAuto.Select(false, -1);
foreach (ExecuteAutoSQL eaSQL in sequences)
store_load.AppendValues (eaSQL.ToLoadTreeview(jumpTypes));
@@ -252,7 +252,7 @@ public class ExecuteAutoWindow
treeview_load, store_load, store_load_uniqueID_col);
if(uniqueID > 0) {
- Sqlite.Delete(false, Constants.ExecuteAutoTable, uniqueID);
+ SqliteGeneral.Sqlite.Delete(false, Constants.ExecuteAutoTable, uniqueID);
store_load = UtilGtk.RemoveRow(treeview_load, store_load);
button_next.Sensitive = false;
}
@@ -267,7 +267,7 @@ public class ExecuteAutoWindow
treeview_load, store_load, store_load_uniqueID_col);
if(uniqueID > 0) {
- ExecuteAutoSQL eaSQL = SqliteExecuteAuto.Select(false, uniqueID)[0];
+ ExecuteAutoSQL eaSQL = SqliteGeneral.SqliteExecuteAuto.Select(false,
uniqueID)[0];
foreach(int i in eaSQL.Serie1IDs)
button_simulate_exercise_clicked(i, 1); //first treeview
@@ -532,7 +532,7 @@ public class ExecuteAutoWindow
notebook_main.NextPage();
}
else if(notebook_main.CurrentPage == 1) {
- ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons(
+ ArrayList persons = SqliteGeneral.SqlitePersonSession.SelectCurrentSessionPersons(
sessionID,
false); //means: do not returnPersonAndPSlist
orderedData = ExecuteAuto.CreateOrder(mode, persons,
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index c5166c2..5efcbab 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -74,7 +74,7 @@ public class EditJumpWindow : EditEventWindow
}
EditJumpWindowBox.weightPercentPreferred = weightPercentPreferred;
- EditJumpWindowBox.personWeight = SqlitePersonSession.SelectAttribute(
+ EditJumpWindowBox.personWeight = SqliteGeneral.SqlitePersonSession.SelectAttribute(
false,
Convert.ToInt32(myEvent.PersonID),
Convert.ToInt32(myEvent.SessionID),
@@ -123,9 +123,9 @@ public class EditJumpWindow : EditEventWindow
Jump myJump = (Jump) myEvent;
string [] myTypes;
if (myJump.TypeHasFall) {
- myTypes = SqliteJumpType.SelectJumpTypes(false, "", "TC", true); //don't show
allJumpsName row, TC jumps, only select name
+ myTypes = SqliteGeneral.SqliteJumpType.SelectJumpTypes(false, "", "TC", true);
//don't show allJumpsName row, TC jumps, only select name
} else {
- myTypes = SqliteJumpType.SelectJumpTypes(false, "", "nonTC", true); //don't show
allJumpsName row, nonTC jumps, only select name
+ myTypes = SqliteGeneral.SqliteJumpType.SelectJumpTypes(false, "", "nonTC", true);
//don't show allJumpsName row, nonTC jumps, only select name
}
return myTypes;
}
@@ -426,7 +426,7 @@ public class EditJumpWindow : EditEventWindow
else
jumpWeightInKg = Convert.ToDouble(entryWeight);
- double newPersonWeight = SqlitePersonSession.SelectAttribute(false, personID,
mySessionID, Constants.Weight);
+ double newPersonWeight = SqliteGeneral.SqlitePersonSession.SelectAttribute(false,
personID, mySessionID, Constants.Weight);
//jumpPercentWeightForNewPerson = jumpWeightInKg * 100 / newPersonWeight;
jumpPercentWeightForNewPerson = Util.WeightFromKgToPercent(jumpWeightInKg,
newPersonWeight);
LogB.Information(string.Format("oldPW: {0}, jWinKg {1}, newPW{2}, jWin%NewP{3}",
@@ -466,7 +466,7 @@ public class EditJumpRjWindow : EditJumpWindow
}
EditJumpRjWindowBox.weightPercentPreferred = weightPercentPreferred;
- EditJumpRjWindowBox.personWeight = SqlitePersonSession.SelectAttribute(
+ EditJumpRjWindowBox.personWeight = SqliteGeneral.SqlitePersonSession.SelectAttribute(
false, myEvent.PersonID, myEvent.SessionID, Constants.Weight);
EditJumpRjWindowBox.pDN = pDN;
@@ -507,7 +507,7 @@ public class EditJumpRjWindow : EditJumpWindow
combo_eventType.Sensitive=false;
string [] myTypes;
- myTypes = SqliteJumpType.SelectJumpRjTypes("", true); //don't show allJumpsName row, only
select name
+ myTypes = SqliteGeneral.SqliteJumpType.SelectJumpRjTypes("", true); //don't show allJumpsName
row, only select name
return myTypes;
}
@@ -609,7 +609,7 @@ public class RepairJumpRjWindow
label_header.Text = string.Format(Catalog.GetString("Use this window to repair this
test.\nDouble clic any cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
- jumpType = SqliteJumpType.SelectAndReturnJumpRjType(myJump.Type, false);
+ jumpType = SqliteGeneral.SqliteJumpType.SelectAndReturnJumpRjType(myJump.Type, false);
TextBuffer tb = new TextBuffer (new TextTagTable());
tb.Text = createTextForTextView(jumpType);
@@ -927,7 +927,7 @@ public class RepairJumpRjWindow
}
//save it deleting the old first for having the same uniqueID
- Sqlite.Delete(false, Constants.JumpRjTable, jumpRj.UniqueID);
+ SqliteGeneral.Sqlite.Delete(false, Constants.JumpRjTable, jumpRj.UniqueID);
jumpRj.InsertAtDB(false, Constants.JumpRjTable);
/*
SqliteGeneral.SqliteJump.InsertRj("jumpRj", jumpRj.UniqueID.ToString(), jumpRj.PersonID,
jumpRj.SessionID,
@@ -1496,7 +1496,7 @@ public class JumpsMoreWindow : EventMoreWindow
protected override void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", without filter, and not obtain only name of
jump
- string [] myJumpTypes = SqliteJumpType.SelectJumpTypes(false, "", "", false);
+ string [] myJumpTypes = SqliteGeneral.SqliteJumpType.SelectJumpTypes(false, "", "", false);
//remove typesTranslated
typesTranslated = new String [myJumpTypes.Length];
@@ -1593,7 +1593,7 @@ public class JumpsMoreWindow : EventMoreWindow
}
protected override void deleteTestLine() {
- SqliteJumpType.Delete(Constants.JumpTypeTable, selectedEventName, false);
+ SqliteGeneral.SqliteJumpType.Delete(Constants.JumpTypeTable, selectedEventName, false);
//delete from typesTranslated
string row = Util.FindOnArray(':',0, -1, selectedEventName, typesTranslated);
@@ -1714,7 +1714,7 @@ public class JumpsRjMoreWindow : EventMoreWindow
protected override void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", and not obtain only name of jump
- string [] myJumpTypes = SqliteJumpType.SelectJumpRjTypes("", false);
+ string [] myJumpTypes = SqliteGeneral.SqliteJumpType.SelectJumpRjTypes("", false);
//remove typesTranslated
typesTranslated = new String [myJumpTypes.Length];
@@ -1871,7 +1871,7 @@ public class JumpsRjMoreWindow : EventMoreWindow
}
protected override void deleteTestLine() {
- SqliteJumpType.Delete(Constants.JumpRjTypeTable, selectedEventName, false);
+ SqliteGeneral.SqliteJumpType.Delete(Constants.JumpRjTypeTable, selectedEventName, false);
//delete from typesTranslated
string row = Util.FindOnArray(':',0, -1, selectedEventName, typesTranslated);
diff --git a/src/gui/jumpType.cs b/src/gui/jumpType.cs
index 82be15a..27c995c 100644
--- a/src/gui/jumpType.cs
+++ b/src/gui/jumpType.cs
@@ -127,7 +127,7 @@ public class JumpTypeAddWindow
name = Util.RemoveChar(name, '"');
//check if this jump type exists, and check it's name is not AllJumpsName
- bool jumpTypeExists = Sqlite.Exists (false, Constants.JumpTypeTable, name);
+ bool jumpTypeExists = SqliteGeneral.Sqlite.Exists (false, Constants.JumpTypeTable, name);
if(name == Constants.AllJumpsName)
jumpTypeExists = true;
@@ -157,7 +157,7 @@ public class JumpTypeAddWindow
myJump = myJump + ":" +
Util.RemoveTildeAndColon(textview_description.Buffer.Text);
- SqliteJumpType.JumpTypeInsert(myJump, false); //false, because dbcon is not
opened
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert(myJump, false); //false, because
dbcon is not opened
InsertedSimple = true;
} else {
@@ -182,7 +182,7 @@ public class JumpTypeAddWindow
myJump = myJump + ":" +
Util.RemoveTildeAndColon(textview_description.Buffer.Text);
- SqliteJumpType.JumpRjTypeInsert(myJump, false); //false, because dbcon is not
opened
+ SqliteGeneral.SqliteJumpType.JumpRjTypeInsert(myJump, false); //false,
because dbcon is not opened
InsertedSimple = false;
}
diff --git a/src/gui/person.cs b/src/gui/person.cs
index fdf7442..ce7bc61 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -163,7 +163,7 @@ public class PersonRecuperateWindow {
{
int except = currentSession.UniqueID;
int inSession = -1; //search persons for recuperating in all sessions
- ArrayList myPersons = SqlitePerson.SelectAllPersonsRecuperable("name", except, inSession,
searchFilterName);
+ ArrayList myPersons = SqliteGeneral.SqlitePerson.SelectAllPersonsRecuperable("name", except,
inSession, searchFilterName);
foreach (Person person in myPersons) {
store.AppendValues (
@@ -248,9 +248,9 @@ public class PersonRecuperateWindow {
{
if(selected != "-1")
{
- currentPerson = SqlitePerson.Select(Convert.ToInt32(selected));
+ currentPerson = SqliteGeneral.SqlitePerson.Select(Convert.ToInt32(selected));
- PersonSession myPS = SqlitePersonSession.Select(currentPerson.UniqueID, -1); //if
sessionID == -1 we search data in last sessionID
+ PersonSession myPS = SqliteGeneral.SqlitePersonSession.Select(currentPerson.UniqueID,
-1); //if sessionID == -1 we search data in last sessionID
//this inserts in DB
currentPersonSession = new PersonSession (
currentPerson.UniqueID, currentSession.UniqueID,
@@ -373,7 +373,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
bool commentsDisable = true;
int sessionIdDisable = currentSession.UniqueID; //for not showing current session on the list
- UtilGtk.ComboUpdate(combo_sessions, SqliteSession.SelectAllSessionsSimple(commentsDisable,
sessionIdDisable), "");
+ UtilGtk.ComboUpdate(combo_sessions,
SqliteGeneral.SqliteSession.SelectAllSessionsSimple(commentsDisable, sessionIdDisable), "");
combo_sessions.Changed += new EventHandler (on_combo_sessions_changed);
@@ -481,7 +481,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
private void fillTreeView (Gtk.TreeView tv, TreeStore store, int except, int inSession)
{
- ArrayList myPersons = SqlitePerson.SelectAllPersonsRecuperable("name", except, inSession,
""); //"" is searchFilterName (not implemented on recuperate multiple)
+ ArrayList myPersons = SqliteGeneral.SqlitePerson.SelectAllPersonsRecuperable("name", except,
inSession, ""); //"" is searchFilterName (not implemented on recuperate multiple)
foreach (Person person in myPersons) {
store.AppendValues (
@@ -569,8 +569,8 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
val = (bool) store.GetValue (iter, 0);
//if checkbox of person is true
if(val) {
- currentPerson = SqlitePerson.Select(true,
Convert.ToInt32(treeview_person_recuperate.Model.GetValue(iter, 1)) );
- PersonSession currentPersonSession = SqlitePersonSession.Select(
+ currentPerson = SqliteGeneral.SqlitePerson.Select(true,
Convert.ToInt32(treeview_person_recuperate.Model.GetValue(iter, 1)) );
+ PersonSession currentPersonSession =
SqliteGeneral.SqlitePersonSession.Select(
true, currentPerson.UniqueID, -1); //if sessionID ==
-1 search data in last sessionID
personSessions.Add(new PersonSession(
psID ++, currentPerson.UniqueID,
currentSession.UniqueID,
@@ -684,7 +684,7 @@ public class PersonNotUploadWindow : PersonsRecuperateFromOtherSessionWindow
createTreeView(treeview_person_recuperate, 1);
treeview_person_recuperate.Model = store;
- initiallyUnchecked = SqlitePersonSessionNotUpload.SelectAll(sessionID);
+ initiallyUnchecked = SqliteGeneral.SqlitePersonSessionNotUpload.SelectAll(sessionID);
if(initiallyUnchecked.Count > 0)
combo_select_checkboxes.Active = 2; //SELECTED
else
@@ -718,7 +718,7 @@ public class PersonNotUploadWindow : PersonsRecuperateFromOtherSessionWindow
we continue using method SelectAllPersonsRecuperable because we want same output columns
*/
- ArrayList myPersons = SqlitePerson.SelectAllPersonsRecuperable("name", -1, sessionID, "");
//"" is searchFilterName (not implemented on recuperate multiple)
+ ArrayList myPersons = SqliteGeneral.SqlitePerson.SelectAllPersonsRecuperable("name", -1,
sessionID, ""); //"" is searchFilterName (not implemented on recuperate multiple)
foreach (Person person in myPersons) {
store.AppendValues (
@@ -767,9 +767,9 @@ public class PersonNotUploadWindow : PersonsRecuperateFromOtherSessionWindow
*/
if(bannedToUploadBefore && uploadNow)
- SqlitePersonSessionNotUpload.Delete(personID, sessionID);
+ SqliteGeneral.SqlitePersonSessionNotUpload.Delete(personID,
sessionID);
else if (! bannedToUploadBefore && ! uploadNow)
- SqlitePersonSessionNotUpload.Add(personID, sessionID);
+ SqliteGeneral.SqlitePersonSessionNotUpload.Add(personID, sessionID);
} while ( store.IterNext(ref iter) );
}
@@ -1123,7 +1123,7 @@ public class PersonAddModifyWindow
private void createComboSports() {
combo_sports = ComboBox.NewText ();
- sports = SqliteSport.SelectAll();
+ sports = SqliteGeneral.SqliteSport.SelectAll();
//create sports translated, only with translated stuff
sportsTranslated = new String[sports.Length];
@@ -1149,7 +1149,7 @@ public class PersonAddModifyWindow
private void createComboSpeciallities(int sportID) {
combo_speciallities = ComboBox.NewText ();
- speciallities = SqliteSpeciallity.SelectAll(true, sportID); //show undefined, filter by sport
+ speciallities = SqliteGeneral.SqliteSpeciallity.SelectAll(true, sportID); //show undefined,
filter by sport
//create speciallities translated, only with translated stuff
speciallitiesTranslated = new String[speciallities.Length];
@@ -1265,7 +1265,7 @@ public class PersonAddModifyWindow
//country stuff
if(currentPerson.CountryID != Constants.CountryUndefinedID) {
- string [] countryString = SqliteCountry.Select(currentPerson.CountryID);
+ string [] countryString =
SqliteGeneral.SqliteCountry.Select(currentPerson.CountryID);
combo_continents.Active = UtilGtk.ComboMakeActive(continentsTranslated,
Catalog.GetString(countryString[3]));
@@ -1282,7 +1282,7 @@ public class PersonAddModifyWindow
//PERSONSESSION STUFF
- PersonSession myPS = SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
+ PersonSession myPS = SqliteGeneral.SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
spinbutton_height.Value = myPS.Height;
spinbutton_weight.Value = myPS.Weight;
@@ -1298,10 +1298,10 @@ public class PersonAddModifyWindow
textview_ps_comments.Buffer = tb2;
}
- sport = SqliteSport.Select(false, mySportID);
+ sport = SqliteGeneral.SqliteSport.Select(false, mySportID);
combo_sports.Active = UtilGtk.ComboMakeActive(sportsTranslated, sport.ToString());
- combo_speciallities.Active = UtilGtk.ComboMakeActive(speciallitiesTranslated,
SqliteSpeciallity.Select(false, mySpeciallityID));
+ combo_speciallities.Active = UtilGtk.ComboMakeActive(speciallitiesTranslated,
SqliteGeneral.SqliteSpeciallity.Select(false, mySpeciallityID));
combo_levels.Active = UtilGtk.ComboMakeActive(levels, myLevelID + ":" +
Util.FindLevelName(myLevelID));
@@ -1356,7 +1356,7 @@ public class PersonAddModifyWindow
//LogB.Information("changed");
try {
int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_sports), sports));
- sport = SqliteSport.Select(false, sportID);
+ sport = SqliteGeneral.SqliteSport.Select(false, sportID);
if(Catalog.GetString(sport.Name) == Catalog.GetString(Constants.SportUndefined)) {
//if sport is undefined, level should be undefined, and unsensitive
@@ -1454,7 +1454,7 @@ public class PersonAddModifyWindow
else {
//get the active continent
string continentEnglish = Util.FindOnArray(':', 1, 0,
UtilGtk.ComboGetActive(combo_continents), continents);
- countries = SqliteCountry.SelectCountriesOfAContinent(continentEnglish, true); //put
undefined first
+ countries = SqliteGeneral.SqliteCountry.SelectCountriesOfAContinent(continentEnglish,
true); //put undefined first
//create countries translated, only with translated stuff
countriesTranslated = new String[countries.Length];
@@ -1499,12 +1499,12 @@ public class PersonAddModifyWindow
Catalog.GetString("Sorry, this sport '{0}' already
exists in database"),
newSportName));
else {
- int myID = SqliteSport.Insert(false, "-1", newSportName, true, //dbconOpened, ,
userDefined
+ int myID = SqliteGeneral.SqliteSport.Insert(false, "-1", newSportName, true,
//dbconOpened, , userDefined
false, ""); //hasSpeciallities, graphLink
Sport mySport = new Sport(myID, newSportName, true,
false, ""); //hasSpeciallities, graphLink
- sports = SqliteSport.SelectAll();
+ sports = SqliteGeneral.SqliteSport.SelectAll();
//create sports translated, only with translated stuff
sportsTranslated = new String[sports.Length];
int i = 0;
@@ -1543,7 +1543,7 @@ public class PersonAddModifyWindow
if(adding)
personExists = SqliteGeneral.Sqlite.Exists (false, Constants.PersonTable,
Util.RemoveTilde(personName));
else
- personExists = SqlitePerson.ExistsAndItsNotMe (currentPerson.UniqueID,
Util.RemoveTilde(personName));
+ personExists = SqliteGeneral.SqlitePerson.ExistsAndItsNotMe (currentPerson.UniqueID,
Util.RemoveTilde(personName));
if(personExists)
errorMessage += string.Format(Catalog.GetString("Person: '{0}' exists. Please, use
another name"),
@@ -1553,7 +1553,7 @@ public class PersonAddModifyWindow
if(!adding && (double) spinbutton_weight.Value != weightIni) {
//see if this person has done jumps with weight
string [] myJumpsNormal = SqliteGeneral.SqliteJump.SelectJumps(false,
currentSession.UniqueID, currentPerson.UniqueID, "withWeight", "",
- SqliteGeneral.Sqlite.Orders_by.DEFAULT, -1);
+ Sqlite.Orders_by.DEFAULT, -1);
string [] myJumpsReactive = SqliteGeneral.SqliteJumpRj.SelectJumps(false,
currentSession.UniqueID, currentPerson.UniqueID, "withWeight", "");
if(myJumpsNormal.Length > 0 || myJumpsReactive.Length > 0) {
@@ -1592,7 +1592,7 @@ public class PersonAddModifyWindow
//convert margarias (it's power is calculated using weight and it's written on description)
string [] myMargarias = SqliteGeneral.SqliteRun.SelectRuns(false, currentSession.UniqueID,
currentPerson.UniqueID, "Margaria",
- SqliteGeneral.Sqlite.Orders_by.DEFAULT, -1);
+ Sqlite.Orders_by.DEFAULT, -1);
foreach(string myStr in myMargarias) {
string [] margaria = myStr.Split(new char[] {':'});
@@ -1628,11 +1628,11 @@ public class PersonAddModifyWindow
Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_countries), countries)),
textview_description.Buffer.Text,
serverUniqueID);
- SqlitePerson.Update (currentPerson);
+ SqliteGeneral.SqlitePerson.Update (currentPerson);
//we only need to update personSession
//1.- search uniqueID
- PersonSession ps = SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
+ PersonSession ps = SqliteGeneral.SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
//2.- create new instance
currentPersonSession = new PersonSession (
@@ -1645,7 +1645,7 @@ public class PersonAddModifyWindow
textview_ps_comments.Buffer.Text);
//3.- update in database
- SqlitePersonSession.Update (currentPersonSession);
+ SqliteGeneral.SqlitePersonSession.Update (currentPersonSession);
}
@@ -2086,9 +2086,9 @@ public class PersonAddMultipleWindow {
string sportStuffString = "";
if(currentSession.PersonsSportID != Constants.SportUndefinedID)
- sportStuffString += Catalog.GetString("Sport") + ":<i>" +
Catalog.GetString(SqliteSport.Select(false, currentSession.PersonsSportID).Name) + "</i>.";
+ sportStuffString += Catalog.GetString("Sport") + ":<i>" +
Catalog.GetString(SqliteGeneral.SqliteSport.Select(false, currentSession.PersonsSportID).Name) + "</i>.";
if(currentSession.PersonsSpeciallityID != Constants.SpeciallityUndefinedID)
- sportStuffString += " " + Catalog.GetString("Specialty") + ":<i>" +
SqliteSpeciallity.Select(false, currentSession.PersonsSpeciallityID) + "</i>.";
+ sportStuffString += " " + Catalog.GetString("Specialty") + ":<i>" +
SqliteGeneral.SqliteSpeciallity.Select(false, currentSession.PersonsSpeciallityID) + "</i>.";
if(currentSession.PersonsPractice != Constants.LevelUndefinedID)
sportStuffString += " " + Catalog.GetString("Level") + ":<i>" +
Util.FindLevelName(currentSession.PersonsPractice) + "</i>.";
@@ -2350,7 +2350,7 @@ public class PersonShowAllEventsWindow {
inSession = sessionID; //select only persons who are on currentSession
}
- ArrayList myPersons = SqlitePerson.SelectAllPersonsRecuperable("name", -1, inSession, "");
//"" is searchFilterName (not implemented on PersonShowAllEventsWindow)
+ ArrayList myPersons = SqliteGeneral.SqlitePerson.SelectAllPersonsRecuperable("name", -1,
inSession, ""); //"" is searchFilterName (not implemented on PersonShowAllEventsWindow)
//put only id and name in combo
string [] myPersonsIDName = new string[myPersons.Count];
@@ -2411,7 +2411,7 @@ public class PersonShowAllEventsWindow {
protected void fillTreeView (Gtk.TreeView tv, TreeStore store, int personID) {
ArrayList myEvents;
- myEvents = SqlitePerson.SelectAllPersonEvents(personID);
+ myEvents = SqliteGeneral.SqlitePerson.SelectAllPersonEvents(personID);
foreach (string myEvent in myEvents) {
string [] myStr = myEvent.Split(new char[] {':'});
diff --git a/src/gui/pulse.cs b/src/gui/pulse.cs
index 5157ec1..20510e7 100644
--- a/src/gui/pulse.cs
+++ b/src/gui/pulse.cs
@@ -83,7 +83,7 @@ public class EditPulseWindow : EditEventWindow
}
protected override string [] findTypes(Event myEvent) {
- string [] myTypes = SqlitePulseType.SelectPulseTypes("", true); //don't show allEventName
row, only select name
+ string [] myTypes = SqliteGeneral.SqlitePulseType.SelectPulseTypes("", true); //don't show
allEventName row, only select name
//on pulses can not change type
combo_eventType.Sensitive = false;
@@ -234,7 +234,7 @@ public class RepairPulseWindow
label_header.Text = string.Format(Catalog.GetString("Use this window to repair this
test.\nDouble clic any cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
- pulseType = SqlitePulseType.SelectAndReturnPulseType(myPulse.Type);
+ pulseType = SqliteGeneral.SqlitePulseType.SelectAndReturnPulseType(myPulse.Type);
TextBuffer tb = new TextBuffer (new TextTagTable());
tb.Text = createTextForTextView(pulseType);
@@ -456,7 +456,7 @@ public class RepairPulseWindow
myPulse.TimesString = timeString;
//save it deleting the old first for having the same uniqueID
- Sqlite.Delete(false, Constants.PulseTable,myPulse.UniqueID);
+ SqliteGeneral.Sqlite.Delete(false, Constants.PulseTable,myPulse.UniqueID);
myPulse.InsertAtDB(false, Constants.PulseTable);
/*
diff --git a/src/gui/queryServer.cs b/src/gui/queryServer.cs
index 7f9b932..fce462a 100644
--- a/src/gui/queryServer.cs
+++ b/src/gui/queryServer.cs
@@ -302,7 +302,7 @@ public class QueryServerWindow
private void createComboSports() {
combo_sports = ComboBox.NewText ();
- sports = SqliteSport.SelectAll();
+ sports = SqliteGeneral.SqliteSport.SelectAll();
//first value has to be any
sports[0] = Constants.SportUndefinedID + ":" + //no problem using the undefinedID
@@ -330,7 +330,7 @@ public class QueryServerWindow
private void createComboSpeciallities(int sportID) {
combo_speciallities = ComboBox.NewText ();
- speciallities = SqliteSpeciallity.SelectAll(true, sportID); //show undefined, filter by sport
+ speciallities = SqliteGeneral.SqliteSpeciallity.SelectAll(true, sportID); //show undefined,
filter by sport
//first value has to be any
speciallities[0] = "-1:" + Constants.Any + ":" + Catalog.GetString(Constants.Any);
@@ -403,13 +403,13 @@ public class QueryServerWindow
}
else if (UtilGtk.ComboGetActive(combo_test_types) ==
Catalog.GetString(Constants.JumpSimpleName))
UtilGtk.ComboUpdate(combo_tests,
- SqliteJumpType.SelectJumpTypes(false, "", "", true), "");
+ SqliteGeneral.SqliteJumpType.SelectJumpTypes(false, "", "", true),
"");
else if (UtilGtk.ComboGetActive(combo_test_types) ==
Catalog.GetString(Constants.JumpReactiveName))
UtilGtk.ComboUpdate(combo_tests,
- SqliteJumpType.SelectJumpRjTypes("", true), "");
+ SqliteGeneral.SqliteJumpType.SelectJumpRjTypes("", true), "");
else if (UtilGtk.ComboGetActive(combo_test_types) ==
Catalog.GetString(Constants.RunSimpleName))
UtilGtk.ComboUpdate(combo_tests,
- SqliteRunType.SelectRunTypes("", true), "");
+ SqliteGeneral.SqliteRunType.SelectRunTypes("", true), "");
combo_tests.Active = 0;
@@ -423,7 +423,7 @@ public class QueryServerWindow
if (UtilGtk.ComboGetActive(combo_test_types) ==
Catalog.GetString(Constants.UndefinedDefault))
UtilGtk.ComboUpdate(combo_variables,
Util.StringToStringArray(Constants.UndefinedDefault), "");
else if (UtilGtk.ComboGetActive(combo_test_types) ==
Catalog.GetString(Constants.JumpSimpleName)) {
- JumpType jt =
SqliteJumpType.SelectAndReturnJumpType(UtilGtk.ComboGetActive(combo_tests), false);
+ JumpType jt =
SqliteGeneral.SqliteJumpType.SelectAndReturnJumpType(UtilGtk.ComboGetActive(combo_tests), false);
if(jt.StartIn)
UtilGtk.ComboUpdate(combo_variables, variablesJumpSimple, "");
else
@@ -452,7 +452,7 @@ public class QueryServerWindow
else {
//get the active continent
string continentEnglish = Util.FindOnArray(':', 1, 0,
UtilGtk.ComboGetActive(combo_continents), continents);
- countries = SqliteCountry.SelectCountriesOfAContinent(continentEnglish, true); //put
undefined first
+ countries = SqliteGeneral.SqliteCountry.SelectCountriesOfAContinent(continentEnglish,
true); //put undefined first
//create countries translated, only with translated stuff
countriesTranslated = new String[countries.Length];
@@ -540,7 +540,7 @@ public class QueryServerWindow
//LogB.Information("changed");
try {
int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_sports), sports));
- sport = SqliteSport.Select(false, sportID);
+ sport = SqliteGeneral.SqliteSport.Select(false, sportID);
if(Catalog.GetString(sport.Name) == Catalog.GetString(Constants.SportAny)) {
//if sport is undefined, level should be undefined, and unsensitive
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 7f13a17..ebf8ea5 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -102,7 +102,7 @@ public class EditRunWindow : EditEventWindow
}
protected override string [] findTypes(Event myEvent) {
- string [] myTypes = SqliteRunType.SelectRunTypes("", true); //don't show allRunsName row,
only select name
+ string [] myTypes = SqliteGeneral.SqliteRunType.SelectRunTypes("", true); //don't show
allRunsName row, only select name
return myTypes;
}
@@ -1191,7 +1191,7 @@ public class RunsMoreWindow : EventMoreWindow
protected override void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", and not obtain only name of jump
- string [] myRunTypes = SqliteRunType.SelectRunTypes("", false);
+ string [] myRunTypes = SqliteGeneral.SqliteRunType.SelectRunTypes("", false);
//remove typesTranslated
typesTranslated = new String [myRunTypes.Length];
diff --git a/src/gui/session.cs b/src/gui/session.cs
index abb0296..a43423b 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -145,7 +145,7 @@ public class SessionAddEditWindow {
if(currentSession.PersonsSportID != Constants.SportUndefinedID) {
radiobutton_same_sport.Active = true;
- Sport mySport = SqliteSport.Select(false, currentSession.PersonsSportID);
+ Sport mySport = SqliteGeneral.SqliteSport.Select(false,
currentSession.PersonsSportID);
combo_sports.Active = UtilGtk.ComboMakeActive(sportsTranslated, mySport.ToString());
if(sport.HasSpeciallities) {
@@ -280,7 +280,7 @@ public class SessionAddEditWindow {
private void createComboSports() {
combo_sports = ComboBox.NewText ();
- sports = SqliteSport.SelectAll();
+ sports = SqliteGeneral.SqliteSport.SelectAll();
//create sports translated, only with translated stuff
sportsTranslated = new String[sports.Length];
@@ -361,7 +361,7 @@ public class SessionAddEditWindow {
try {
//sport = new Sport(UtilGtk.ComboGetActive(combo_sports));
int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_sports), sports));
- sport = SqliteSport.Select(false, sportID);
+ sport = SqliteGeneral.SqliteSport.Select(false, sportID);
if(Catalog.GetString(sport.Name) == Catalog.GetString(Constants.SportUndefined)) {
//if sport is undefined, level should be undefined, and unsensitive
@@ -456,7 +456,7 @@ public class SessionAddEditWindow {
else {
sportString = Catalog.GetString("All people in session practice the same
sport:");
int sportID = Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_sports), sports));
- Sport mySport = SqliteSport.Select(false, sportID);
+ Sport mySport = SqliteGeneral.SqliteSport.Select(false, sportID);
if(sportID == Constants.SportUndefinedID)
sportString += "<tt>" + pleaseDefineItString + "</tt>";
@@ -531,7 +531,7 @@ public class SessionAddEditWindow {
private void on_sport_add_accepted (object o, EventArgs args) {
genericWin.Button_accept.Clicked -= new EventHandler(on_sport_add_accepted);
string newSportName = genericWin.EntrySelected;
- if(Sqlite.Exists(false, Constants.SportTable, newSportName) ||
+ if(SqliteGeneral.Sqlite.Exists(false, Constants.SportTable, newSportName) ||
newSportName == Catalog.GetString(Constants.SportUndefined) || //let's save
problems
newSportName == Catalog.GetString(Constants.SportNone) //let's save
problems
)
@@ -539,12 +539,12 @@ public class SessionAddEditWindow {
Catalog.GetString("Sorry, this sport '{0}' already
exists in database"),
newSportName));
else {
- int myID = SqliteSport.Insert(false, "-1", newSportName, true, //dbconOpened, ,
userDefined
+ int myID = SqliteGeneral.SqliteSport.Insert(false, "-1", newSportName, true,
//dbconOpened, , userDefined
false, ""); //hasSpeciallities, graphLink
Sport mySport = new Sport(myID, newSportName, true,
false, ""); //hasSpeciallities, graphLink
- sports = SqliteSport.SelectAll();
+ sports = SqliteGeneral.SqliteSport.SelectAll();
//create sports translated, only with translated stuff
sportsTranslated = new String[sports.Length];
int i = 0;
@@ -797,7 +797,7 @@ public class SessionLoadWindow {
if(entry_search_filter.Text.ToString().Length > 0)
filterName = entry_search_filter.Text.ToString();
- string [] mySessions = SqliteSession.SelectAllSessions(filterName); //returns a string of
values separated by ':'
+ string [] mySessions = SqliteGeneral.SqliteSession.SelectAllSessions(filterName); //returns a
string of values separated by ':'
foreach (string session in mySessions) {
string [] myStringFull = session.Split(new char[] {':'});
@@ -922,7 +922,7 @@ public class SessionLoadWindow {
void on_button_accept_clicked (object o, EventArgs args)
{
if(selected != "-1") {
- currentSession = SqliteSession.Select (selected);
+ currentSession = SqliteGeneral.SqliteSession.Select (selected);
SessionLoadWindowBox.session_load.Hide();
SessionLoadWindowBox = null;
}
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 0ea56fc..b550dd1 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -574,7 +574,7 @@ public partial class ChronoJumpWindow {
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions, "");
combo_stats_stat_subtype.Sensitive = false;
- ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons(
+ ArrayList persons = SqliteGeneral.SqlitePersonSession.SelectCurrentSessionPersons(
currentSession.UniqueID,
false); //means: do not returnPersonAndPSlist
@@ -641,7 +641,7 @@ public partial class ChronoJumpWindow {
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), ""); //only select
name
+ SqliteGeneral.SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), "");
//only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
@@ -655,7 +655,7 @@ public partial class ChronoJumpWindow {
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsName, true),
""); //only select name
+
SqliteGeneral.SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsName, true), ""); //only select
name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
diff --git a/src/gui/usefulObjects.cs b/src/gui/usefulObjects.cs
index 972ff58..5efb634 100644
--- a/src/gui/usefulObjects.cs
+++ b/src/gui/usefulObjects.cs
@@ -75,7 +75,7 @@ public class PrepareEventGraphJumpSimple {
public PrepareEventGraphJumpSimple(double tv, double tc, int sessionID, int personID, string table,
string type)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//select data from SQL to update graph
jumpsAtSQL = SqliteGeneral.SqliteJump.SelectJumps(true, sessionID, personID, "", type,
@@ -90,19 +90,19 @@ public class PrepareEventGraphJumpSimple {
} else
sqlSelect = "TC";
- personMAXAtSQLAllSessions = SqliteSession.SelectMAXEventsOfAType(true, -1, personID, table,
type, sqlSelect);
- personMAXAtSQL = SqliteSession.SelectMAXEventsOfAType(true, sessionID, personID, table, type,
sqlSelect);
- sessionMAXAtSQL = SqliteSession.SelectMAXEventsOfAType(true, sessionID, -1, table, type,
sqlSelect);
+ personMAXAtSQLAllSessions = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(true, -1,
personID, table, type, sqlSelect);
+ personMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(true, sessionID,
personID, table, type, sqlSelect);
+ sessionMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(true, sessionID, -1,
table, type, sqlSelect);
- personAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(true, sessionID, personID, table, type,
sqlSelect);
- sessionAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(true, sessionID, -1, table, type,
sqlSelect);
+ personAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(true, sessionID,
personID, table, type, sqlSelect);
+ sessionAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(true, sessionID, -1,
table, type, sqlSelect);
//end of select data from SQL to update graph
this.tv = tv;
this.tc = tc;
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
~PrepareEventGraphJumpSimple() {}
@@ -146,33 +146,33 @@ public class PrepareEventGraphRunSimple {
public PrepareEventGraphRunSimple(double time, double speed, int sessionID, int personID, string
table, string type)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//obtain data
runsAtSQL = SqliteGeneral.SqliteRun.SelectRuns(true, sessionID, personID, type,
- Sqlite.Orders_by.ID_DESC, 10); //select only last 10
+ SqliteGeneral.Sqlite.Orders_by.ID_DESC, 10); //select only last 10
string sqlSelect = "distance/time";
- personMAXAtSQLAllSessions = SqliteSession.SelectMAXEventsOfAType(true, -1, personID, table,
type, sqlSelect);
- personMAXAtSQL = SqliteSession.SelectMAXEventsOfAType(true, sessionID, personID, table, type,
sqlSelect);
- sessionMAXAtSQL = SqliteSession.SelectMAXEventsOfAType(true, sessionID, -1, table, type,
sqlSelect);
+ personMAXAtSQLAllSessions = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(true, -1,
personID, table, type, sqlSelect);
+ personMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(true, sessionID,
personID, table, type, sqlSelect);
+ sessionMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(true, sessionID, -1,
table, type, sqlSelect);
- //distancePersonAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(true, sessionID, personID,
table, type, "distance");
- //distanceSessionAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(true, sessionID, -1, table,
type, "distance");
+ //distancePersonAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(true,
sessionID, personID, table, type, "distance");
+ //distanceSessionAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(true,
sessionID, -1, table, type, "distance");
//better to know speed like:
//SELECT AVG(distance/time) from run; than
//SELECT AVG(distance) / SELECT AVG(time)
//first is ok, because is the speed AVG
//2nd is not good because it tries to do an AVG of all distances and times
- personAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(true, sessionID, personID, table, type,
sqlSelect);
- sessionAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(true, sessionID, -1, table, type,
sqlSelect);
+ personAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(true, sessionID,
personID, table, type, sqlSelect);
+ sessionAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(true, sessionID, -1,
table, type, sqlSelect);
this.time = time;
this.speed = speed;
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
~PrepareEventGraphRunSimple() {}
@@ -234,28 +234,28 @@ public class PrepareEventGraphReactionTime {
public PrepareEventGraphReactionTime(double time, int sessionID, int personID, string table, string
type)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//obtain data
rtsAtSQL = SqliteGeneral.SqliteReactionTime.SelectReactionTimes(true, sessionID, personID,
type,
- Sqlite.Orders_by.ID_DESC, 10); //select only last 10
+ SqliteGeneral.Sqlite.Orders_by.ID_DESC, 10); //select only last 10
- personMAXAtSQL = SqliteSession.SelectMAXEventsOfAType(
+ personMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(
true, sessionID, personID, table, type, "time");
- sessionMAXAtSQL = SqliteSession.SelectMAXEventsOfAType(
+ sessionMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(
true, sessionID, -1, table, type, "time");
- personMINAtSQL = SqliteSession.SelectMINEventsOfAType(
+ personMINAtSQL = SqliteGeneral.SqliteSession.SelectMINEventsOfAType(
true, sessionID, personID, table, type, "time");
- sessionMINAtSQL = SqliteSession.SelectMINEventsOfAType(
+ sessionMINAtSQL = SqliteGeneral.SqliteSession.SelectMINEventsOfAType(
true, sessionID, -1, table, type, "time");
- personAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(
+ personAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(
true, sessionID, personID, table, type, "time");
- sessionAVGAtSQL = SqliteSession.SelectAVGEventsOfAType(
+ sessionAVGAtSQL = SqliteGeneral.SqliteSession.SelectAVGEventsOfAType(
true, sessionID, -1, table, type, "time");
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
this.time = time;
}
diff --git a/src/oldCodeNeedToDBConvert/sqlite/person.cs b/src/oldCodeNeedToDBConvert/sqlite/person.cs
index ada14a3..faa01e8 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/person.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/person.cs
@@ -57,7 +57,7 @@ class SqlitePersonOld : Sqlite
//can be "Constants.PersonOldTable" or "Constants.ConvertTempTable"
//temp is used to modify table between different database versions if needed
- public static int Insert(bool dbconOpened, string tableName, string uniqueID, string name, string
sex, DateTime dateBorn, double height, double weight, int sportID, int speciallityID, int practice, string
description, int race, int countryID, int serverUniqueID)
+ public int Insert(bool dbconOpened, string tableName, string uniqueID, string name, string sex,
DateTime dateBorn, double height, double weight, int sportID, int speciallityID, int practice, string
description, int race, int countryID, int serverUniqueID)
{
if(! dbconOpened)
dbcon.Open();
@@ -120,7 +120,7 @@ class SqlitePersonOld : Sqlite
from SqlitePersonSessionWeight.DeletePersonFromSessionAndTests()
if person is not in other sessions, delete it from DB
*/
- public static void Delete(int uniqueID)
+ public void Delete(int uniqueID)
{
dbcmd.CommandText = "Delete FROM " + Constants.PersonOldTable +
" WHERE uniqueID == " + uniqueID.ToString();
diff --git a/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
b/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
index be19d3a..9ae251f 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
@@ -44,7 +44,7 @@ class SqlitePersonSessionOld : Sqlite
dbcmd.ExecuteNonQuery();
}
- public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int
sessionID, double weight)
+ public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
double weight)
{
if(!dbconOpened)
dbcon.Open();
@@ -128,7 +128,7 @@ class SqlitePersonSessionOld : Sqlite
}
}
- public static bool PersonExistsInPS(int personID)
+ public bool PersonExistsInPS(int personID)
{
dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionOldWeightTable +
" WHERE personID == " + personID;
diff --git a/src/oldCodeNeedToDBConvert/sqlite/session.cs b/src/oldCodeNeedToDBConvert/sqlite/session.cs
index 3988af0..898f453 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/session.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/session.cs
@@ -39,7 +39,7 @@ class SqliteSessionOld : Sqlite
* don't do more like this, use Sqlite.convertTables()
*/
//change DB from 0.55 to 0.56
- protected internal static void convertTableAddingSportStuff()
+ protected internal void convertTableAddingSportStuff()
{
ArrayList myArray = new ArrayList(2);
diff --git a/src/runType.cs b/src/runType.cs
index 2cfe997..f5f8ee4 100644
--- a/src/runType.cs
+++ b/src/runType.cs
@@ -473,7 +473,7 @@ public class RunType : EventType
return SqliteGeneral.SqliteRunIntervalType.Insert(this, tableName, dbconOpened);
else
/*
- return SqliteRunType.Insert(dbconOpened, tableName,
+ return SqliteGeneral.SqliteRunType.Insert(dbconOpened, tableName,
name, distance, description);
*/
return SqliteGeneral.SqliteRunType.Insert(this, tableName, dbconOpened);
@@ -487,7 +487,7 @@ public class RunType : EventType
if(isPredefined) {
return distance;
} else {
- return SqliteRunType.Distance(name);
+ return SqliteGeneral.SqliteRunType.Distance(name);
}
*/
return distance;
diff --git a/src/server.cs b/src/server.cs
index 5fc9af5..54a7149 100644
--- a/src/server.cs
+++ b/src/server.cs
@@ -192,7 +192,7 @@ public class Server
string sportsSeparator = "";
//upload persons (updating also person.serverUniqueID locally)
- ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons(
+ ArrayList persons = SqliteGeneral.SqlitePersonSession.SelectCurrentSessionPersons(
serverSession.UniqueID,
false); //means: do not returnPersonAndPSlist
@@ -209,7 +209,7 @@ public class Server
if(Util.FoundInArrayList(notToUpload, person.UniqueID.ToString()))
continue;
- PersonSession ps = SqlitePersonSession.Select(person.UniqueID,
currentSession.UniqueID);
+ PersonSession ps = SqliteGeneral.SqlitePersonSession.Select(person.UniqueID,
currentSession.UniqueID);
//check person if exists
if(person.ServerUniqueID != Constants.ServerUndefinedID)
@@ -256,7 +256,7 @@ public class Server
string [] jumps = SqliteGeneral.SqliteJump.SelectJumps(false,
currentSession.UniqueID, person.UniqueID, "", "",
Sqlite.Orders_by.DEFAULT, -1);
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string myJump in jumps) {
string [] js = myJump.Split(new char[] {':'});
//select jump
@@ -271,7 +271,7 @@ public class Server
if(test.Simulated == 0) {
//upload jumpType if is user defined and doesn't exists in
server database
//JumpType type = new JumpType(test.Type);
- JumpType type =
SqliteJumpType.SelectAndReturnJumpType(test.Type, true);
+ JumpType type =
SqliteGeneral.SqliteJumpType.SelectAndReturnJumpType(test.Type, true);
if( ! type.IsPredefined) {
//Console.WriteLine("USER DEFINED TEST: " +
test.Type);
//
@@ -312,7 +312,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.jumpsU = countU;
@@ -325,7 +325,7 @@ public class Server
countS = 0;
string [] jumpsRj = SqliteGeneral.SqliteJumpRj.SelectJumps(false,
currentSession.UniqueID, person.UniqueID, "", "");
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string myJump in jumpsRj) {
string [] js = myJump.Split(new char[] {':'});
//select jump
@@ -335,7 +335,7 @@ public class Server
test.SessionID = currentSession.ServerUniqueID;
if(test.Simulated == 0) {
- JumpType type =
SqliteJumpType.SelectAndReturnJumpRjType(test.Type, true);
+ JumpType type =
SqliteGeneral.SqliteJumpType.SelectAndReturnJumpRjType(test.Type, true);
if( ! type.IsPredefined) {
string insertedType = myServer.UploadJumpRjType(type,
evalSID);
if(insertedType != "-1") {
@@ -356,7 +356,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.jumpsRjU = countU;
@@ -371,7 +371,7 @@ public class Server
string [] runs = SqliteGeneral.SqliteRun.SelectRuns(false,
currentSession.UniqueID, person.UniqueID, "",
Sqlite.Orders_by.DEFAULT, -1);
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string myRun in runs) {
string [] js = myRun.Split(new char[] {':'});
//select run
@@ -381,7 +381,7 @@ public class Server
test.SessionID = currentSession.ServerUniqueID;
if(test.Simulated == 0) {
- RunType type =
SqliteRunType.SelectAndReturnRunType(test.Type, true);
+ RunType type =
SqliteGeneral.SqliteRunType.SelectAndReturnRunType(test.Type, true);
if( ! type.IsPredefined) {
string insertedType = myServer.UploadRunType(type,
evalSID);
if(insertedType != "-1") {
@@ -402,7 +402,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.runsU = countU;
@@ -415,7 +415,7 @@ public class Server
countS = 0;
string [] runsI = SqliteGeneral.SqliteRunInterval.SelectRuns(false,
currentSession.UniqueID, person.UniqueID, "");
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string myRun in runsI) {
string [] js = myRun.Split(new char[] {':'});
//select run
@@ -445,7 +445,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.runsIU = countU;
@@ -458,9 +458,9 @@ public class Server
countS = 0;
string [] rts = SqliteGeneral.SqliteReactionTime.SelectReactionTimes(false,
currentSession.UniqueID, person.UniqueID, "",
- Sqlite.Orders_by.DEFAULT, -1);
+ SqliteGeneral.Sqlite.Orders_by.DEFAULT, -1);
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string myRt in rts) {
string [] js = myRt.Split(new char[] {':'});
//select rt
@@ -478,7 +478,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.rtsU = countU;
@@ -491,7 +491,7 @@ public class Server
countS = 0;
string [] pulses = SqliteGeneral.SqlitePulse.SelectPulses(false,
currentSession.UniqueID, person.UniqueID);
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string myPulse in pulses) {
string [] js = myPulse.Split(new char[] {':'});
//select pulse
@@ -509,7 +509,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.pulsesU = countU;
@@ -522,7 +522,7 @@ public class Server
countS = 0;
string [] mcs = SqliteGeneral.SqliteMultiChronopic.SelectTests(false,
currentSession.UniqueID, person.UniqueID);
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
foreach(string mc in mcs) {
string [] js = mc.Split(new char[] {':'});
//select mc
@@ -540,7 +540,7 @@ public class Server
else //SIMULATED
countS ++;
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//other thread updates the gui:
sessionUploadPersonData.mcsU = countU;
diff --git a/src/session.cs b/src/session.cs
index 9d11c71..5c58c40 100644
--- a/src/session.cs
+++ b/src/session.cs
@@ -80,7 +80,7 @@ public partial class Session {
this.serverUniqueID = serverUniqueID; //remember don't do this on server
/*
- uniqueID = SqliteSession.Insert (false, //dbconOpened,
+ uniqueID = SqliteGeneral.SqliteSession.Insert (false, //dbconOpened,
Constants.SessionTable, name, place, date, personsSportID,
personsSpeciallityID, personsPractice, comments, serverUniqueID);
*/
uniqueID = -1;
diff --git a/src/sqlite/country.cs b/src/sqlite/country.cs
index 9ef36dc..6ef0645 100644
--- a/src/sqlite/country.cs
+++ b/src/sqlite/country.cs
@@ -30,7 +30,7 @@ using Mono.Data.Sqlite;
using Mono.Unix;
-class SqliteCountry : Sqlite
+public class SqliteCountry : Sqlite
{
protected internal void createTable()
{
@@ -74,7 +74,7 @@ class SqliteCountry : Sqlite
public void Insert(bool dbconOpened, SqliteCommand mycmd, string code, string nameEnglish, string
continent)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string myString = "INSERT INTO " + Constants.CountryTable +
//" (uniqueID, code, name, continent) VALUES (NULL, '" + code + "', '" +
@@ -96,12 +96,12 @@ class SqliteCountry : Sqlite
*/
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public string [] SelectCountriesOfAContinent(string continent, bool insertUndefined)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT uniqueID, name FROM " + Constants.CountryTable + " WHERE
continent == \"" + continent + "\"";
@@ -116,7 +116,7 @@ class SqliteCountry : Sqlite
reader[1].ToString() + ":" +
Catalog.GetString(reader[1].ToString()));
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
int count = 0;
string [] myReturn;
@@ -136,7 +136,7 @@ class SqliteCountry : Sqlite
public string [] Select(int uniqueID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.CountryTable + " WHERE uniqueID == " +
uniqueID;
@@ -154,7 +154,7 @@ class SqliteCountry : Sqlite
myReturn[3] = reader[3].ToString(); //continent
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myReturn;
}
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index f187fee..e75d656 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -72,7 +72,7 @@ public class SqliteEncoder : Sqlite
public int Insert(bool dbconOpened, EncoderSQL es)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(es.uniqueID == "-1")
es.uniqueID = "NULL";
@@ -102,7 +102,7 @@ public class SqliteEncoder : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -120,7 +120,7 @@ public class SqliteEncoder : Sqlite
private void update(bool dbconOpened, EncoderSQL es, SqliteCommand mycmd)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(es.uniqueID == "-1")
es.uniqueID = "NULL";
@@ -150,7 +150,7 @@ public class SqliteEncoder : Sqlite
mycmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public int UpdateTransaction(ArrayList data, string [] checkboxes)
@@ -159,7 +159,7 @@ public class SqliteEncoder : Sqlite
int countActive = 0;
LogB.SQL("Starting transaction");
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
using(SqliteTransaction tr = dbcon.BeginTransaction())
{
@@ -183,7 +183,7 @@ public class SqliteEncoder : Sqlite
tr.Commit();
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
LogB.SQL("Ended transaction");
return countActive;
}
@@ -210,7 +210,7 @@ public class SqliteEncoder : Sqlite
bool onlyActive, bool orderIDascendent)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string personIDStr = "";
if(personID != -1)
@@ -316,7 +316,7 @@ public class SqliteEncoder : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -326,7 +326,7 @@ public class SqliteEncoder : Sqlite
public ArrayList SelectCompareIntersession (bool dbconOpened, Constants.EncoderGI encoderGI, int
exerciseID, int personID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string exerciseIDStr = "";
if(exerciseID != -1)
@@ -456,7 +456,7 @@ public class SqliteEncoder : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -464,7 +464,7 @@ public class SqliteEncoder : Sqlite
public ArrayList SelectSessionOverview (bool dbconOpened, Constants.EncoderGI encoderGI, int
sessionID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText =
"SELECT person77.name, encoder.encoderConfiguration, encoderExercise.name,
(personSession77.weight * encoderExercise.percentBodyWeight/100) + encoder.extraWeight, COUNT(*)" +
@@ -515,7 +515,7 @@ public class SqliteEncoder : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -539,7 +539,7 @@ public class SqliteEncoder : Sqlite
public void SignalCurveInsert(bool dbconOpened, int signalID, int curveID, int msCentral)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "INSERT INTO " + Constants.EncoderSignalCurveTable +
" (uniqueID, signalID, curveID, msCentral, future1) " +
@@ -548,7 +548,7 @@ public class SqliteEncoder : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
@@ -558,7 +558,7 @@ public class SqliteEncoder : Sqlite
public ArrayList SelectSignalCurve (bool dbconOpened, int signalID, int curveID, double msStart,
double msEnd)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string whereStr = "";
if(signalID != -1 || curveID != -1 || msStart != -1)
@@ -604,7 +604,7 @@ public class SqliteEncoder : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -612,7 +612,7 @@ public class SqliteEncoder : Sqlite
public void DeleteSignalCurveWithCurveID(bool dbconOpened, int curveID)
{
if( ! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "Delete FROM " + Constants.EncoderSignalCurveTable +
" WHERE curveID == " + curveID.ToString();
@@ -620,7 +620,7 @@ public class SqliteEncoder : Sqlite
dbcmd.ExecuteNonQuery();
if( ! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//when select from database, ensure path separators are ok for this platform
@@ -675,7 +675,7 @@ public class SqliteEncoder : Sqlite
string ressistance, string description, string speed1RM) //speed1RM decimal
point = '.'
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "INSERT INTO " + Constants.EncoderExerciseTable +
" (uniqueID, name, percentBodyWeight, ressistance, description, future1,
future2, future3)" +
@@ -685,7 +685,7 @@ public class SqliteEncoder : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//Note: if this names change, or there are new, change them on both:
@@ -715,13 +715,13 @@ public class SqliteEncoder : Sqlite
protected internal void addEncoderFreeExercise()
{
- bool exists = Sqlite.Exists (true, Constants.EncoderExerciseTable, "Free");
+ bool exists = SqliteGeneral.Sqlite.Exists (true, Constants.EncoderExerciseTable, "Free");
if(! exists)
InsertExercise(true, "Free", 0, "", "", "");
}
protected internal void addEncoderJumpExercise()
{
- bool exists = Sqlite.Exists (true, Constants.EncoderExerciseTable, "Jump");
+ bool exists = SqliteGeneral.Sqlite.Exists (true, Constants.EncoderExerciseTable, "Jump");
if(! exists)
InsertExercise(true, "Jump", 100, "", "", "");
}
@@ -743,7 +743,7 @@ public class SqliteEncoder : Sqlite
string ressistance, string description, string speed1RM)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.EncoderExerciseTable + " SET " +
" name = \"" + name +
@@ -757,7 +757,7 @@ public class SqliteEncoder : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//if uniqueID != -1, returns an especific EncoderExercise that can be read like this
@@ -765,7 +765,7 @@ public class SqliteEncoder : Sqlite
public ArrayList SelectEncoderExercises(bool dbconOpened, int uniqueID, bool onlyNames)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string uniqueIDStr = "";
if(uniqueID != -1)
@@ -810,7 +810,7 @@ public class SqliteEncoder : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -819,7 +819,7 @@ public class SqliteEncoder : Sqlite
public ArrayList SelectEncoderRowsOfAnExercise(bool dbconOpened, int exerciseID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "select count(*), " +
Constants.PersonTable + ".name, " +
@@ -851,7 +851,7 @@ public class SqliteEncoder : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -896,7 +896,7 @@ public class SqliteEncoder : Sqlite
public int Insert1RM(bool dbconOpened, int personID, int sessionID, int exerciseID, double load1RM)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "INSERT INTO " + Constants.Encoder1RMTable +
" (uniqueID, personID, sessionID, exerciseID, load1RM, future1, future2,
future3)" +
@@ -912,7 +912,7 @@ public class SqliteEncoder : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -920,7 +920,7 @@ public class SqliteEncoder : Sqlite
public ArrayList Select1RM (bool dbconOpened, int personID, int sessionID, int exerciseID, bool
returnPersonNameAndExerciseName)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string whereStr = "";
if(personID != -1 || sessionID != -1 || exerciseID != -1) {
@@ -993,7 +993,7 @@ public class SqliteEncoder : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
diff --git a/src/sqlite/event.cs b/src/sqlite/event.cs
index 49bd4be..27cba61 100644
--- a/src/sqlite/event.cs
+++ b/src/sqlite/event.cs
@@ -57,7 +57,7 @@ public class SqliteEvent : Sqlite
public int GraphLinkInsert(string tableName, string eventName, string graphFileName, bool
dbconOpened, SqliteCommand mycmd)
{
if(! dbconOpened) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
}
mycmd.CommandText = "INSERT INTO graphLinkTable" +
"(uniqueID, tableName, eventName, graphFileName, other1, other2)" +
@@ -70,7 +70,7 @@ public class SqliteEvent : Sqlite
mycmd.CommandText = myString;
int myLast = Convert.ToInt32(mycmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened) {
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
return myLast;
@@ -79,7 +79,7 @@ public class SqliteEvent : Sqlite
//do not use this because some graph like the takeoff.png are not in this SQL table
public string GraphLinkSelectFileName(string tableName, string eventName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT graphFileName FROM graphLinkTable WHERE tableName == \"" +
tableName + "\" AND eventName ==\"" + eventName + "\"";
@@ -95,7 +95,7 @@ public class SqliteEvent : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return returnString;
}
@@ -104,7 +104,7 @@ public class SqliteEvent : Sqlite
public void UpdateSimulated(bool dbconOpened, string tableName, int uniqueID, int simulated)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + tableName + " SET simulated = " + simulated +
" WHERE uniqueID == " + uniqueID ;
@@ -112,7 +112,7 @@ public class SqliteEvent : Sqlite
dbcmd.ExecuteNonQuery();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//convertSimulate and simulateConvertToNegative as a part of db conversion to 0.60
diff --git a/src/sqlite/executeAuto.cs b/src/sqlite/executeAuto.cs
index 2f8614d..33745c4 100644
--- a/src/sqlite/executeAuto.cs
+++ b/src/sqlite/executeAuto.cs
@@ -60,7 +60,7 @@ public class SqliteExecuteAuto : Sqlite
public void Insert(bool dbconOpened, ExecuteAutoSQL eaSQL)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "INSERT INTO " + Constants.ExecuteAutoTable +
" (uniqueID, name, mode, description, " +
@@ -76,12 +76,12 @@ public class SqliteExecuteAuto : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
protected internal void addChronojumpProfileAndBilateral()
{
- string [] jumps = SqliteJumpType.SelectJumpTypes(true, "", "", false);
+ string [] jumps = SqliteGeneral.SqliteJumpType.SelectJumpTypes(true, "", "", false);
IDNameList jList = new IDNameList(jumps,':');
@@ -125,7 +125,7 @@ public class SqliteExecuteAuto : Sqlite
public List<ExecuteAutoSQL> Select(bool dbconOpened, int uniqueID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string whereStr = "";
if(uniqueID != -1)
@@ -154,7 +154,7 @@ public class SqliteExecuteAuto : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return sequences;
}
diff --git a/src/sqlite/jump.cs b/src/sqlite/jump.cs
index 7dc7826..2255b33 100644
--- a/src/sqlite/jump.cs
+++ b/src/sqlite/jump.cs
@@ -68,7 +68,7 @@ public class SqliteJump : Sqlite
public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
string type, double tv, double tc, double fall, double weight, string description, double angle, int
simulated)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -90,7 +90,7 @@ public class SqliteJump : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -103,7 +103,7 @@ public class SqliteJump : Sqlite
Orders_by order, int limit)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
string tps = Constants.PersonSessionTable;
@@ -177,7 +177,7 @@ public class SqliteJump : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myJumps = new string[count];
@@ -192,7 +192,7 @@ public class SqliteJump : Sqlite
public Jump SelectJumpData(int uniqueID, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM jump WHERE uniqueID == " + uniqueID;
@@ -208,7 +208,7 @@ public class SqliteJump : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myJump;
}
@@ -234,7 +234,7 @@ public class SqliteJump : Sqlite
} else
sqlSelect = "jump.TC";
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT session.date, session.name, MAX(" + sqlSelect + "),
jump.simulated " +
" FROM jump, session WHERE type = \"" + jumpType.Name + "\" AND personID = " +
personID +
" AND jump.sessionID = session.uniqueID";
@@ -249,7 +249,7 @@ public class SqliteJump : Sqlite
string [] str = DataReaderToStringArray(reader, 4);
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return str;
}
@@ -259,7 +259,7 @@ public class SqliteJump : Sqlite
string personID = pID.ToString();
string sessionID = sID.ToString();
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
double sj = selectDouble(
"SELECT MAX(tv * tv * 1.226) " +
@@ -291,7 +291,7 @@ public class SqliteJump : Sqlite
" WHERE type = \"DJa\" " +
" AND personID = " + personID + " AND sessionID = " + sessionID);
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
List<Double> l = new List<Double>();
l.Add(sj);
@@ -305,7 +305,7 @@ public class SqliteJump : Sqlite
public void Update(int jumpID, string type, string tv, string tc, string fall, int personID, double
weight, string description, double angle)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE jump SET personID = " + personID +
", type = \"" + type +
"\", tv = " + Util.ConvertToPoint(tv) +
@@ -317,27 +317,27 @@ public class SqliteJump : Sqlite
" WHERE uniqueID == " + jumpID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public void UpdateWeight(string tableName, int uniqueID, double weight)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + tableName + " SET weight = " + Util.ConvertToPoint(weight) +
" WHERE uniqueID == " + uniqueID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public void UpdateDescription(string tableName, int uniqueID, string description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + tableName + " SET description = \"" + description +
"\" WHERE uniqueID == " + uniqueID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//onle for change SJ+ CMJ+ and ABK+ to SJl...
diff --git a/src/sqlite/jumpRj.cs b/src/sqlite/jumpRj.cs
index 591844f..654bfb9 100644
--- a/src/sqlite/jumpRj.cs
+++ b/src/sqlite/jumpRj.cs
@@ -61,7 +61,7 @@ public class SqliteJumpRj : SqliteJump
public int Insert (bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
string type, double tvMax, double tcMax, double fall, double weight, string description, double tvAvg, double
tcAvg, string tvString, string tcString, int jumps, double time, string limited, string angleString, int
simulated )
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -86,7 +86,7 @@ public class SqliteJumpRj : SqliteJump
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -94,7 +94,7 @@ public class SqliteJumpRj : SqliteJump
public new string[] SelectJumps(bool dbconOpened, int sessionID, int personID, string filterWeight,
string filterType)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
string tps = Constants.PersonSessionTable;
@@ -165,7 +165,7 @@ public class SqliteJumpRj : SqliteJump
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myJumps = new string[count];
count =0;
@@ -181,7 +181,7 @@ public class SqliteJumpRj : SqliteJump
//tableName is jumpRj or tempJumpRj
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + tableName + " WHERE uniqueID == " + uniqueID;
@@ -196,13 +196,13 @@ public class SqliteJumpRj : SqliteJump
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myJump;
}
public void Update(int jumpID, int personID, string fall, double weight, string description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE jumpRj SET personID = " + personID +
", fall = " + Util.ConvertToPoint(Convert.ToDouble(fall)) +
", weight = " + Util.ConvertToPoint(weight) +
@@ -210,14 +210,14 @@ public class SqliteJumpRj : SqliteJump
"\" WHERE uniqueID == " + jumpID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//checks if there are Rjs with different number of TCs than TFs
//then repair database manually, and look if the jump is jumpLimited, and how many jumps there are
defined
public void FindBadRjs()
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT uniqueID, tcstring, tvstring, jumps, limited FROM jumpRj";
@@ -238,7 +238,7 @@ public class SqliteJumpRj : SqliteJump
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/jumpType.cs b/src/sqlite/jumpType.cs
index 6ef416d..ec5c8d4 100644
--- a/src/sqlite/jumpType.cs
+++ b/src/sqlite/jumpType.cs
@@ -198,7 +198,7 @@ public class SqliteJumpType : Sqlite
{
string [] myStr = myJump.Split(new char[] {':'});
if(! dbconOpened) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
}
mycmd.CommandText = "INSERT INTO " + Constants.JumpTypeTable +
" (uniqueID, name, startIn, weight, description)" +
@@ -208,7 +208,7 @@ public class SqliteJumpType : Sqlite
LogB.SQL(mycmd.CommandText.ToString());
mycmd.ExecuteNonQuery();
if(! dbconOpened) {
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
@@ -223,7 +223,7 @@ public class SqliteJumpType : Sqlite
{
string [] myStr = myJump.Split(new char[] {':'});
if(! dbconOpened) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
}
mycmd.CommandText = "INSERT INTO " + Constants.JumpRjTypeTable +
" (uniqueID, name, startIn, weight, jumpsLimited, fixedValue, description)" +
@@ -234,7 +234,7 @@ public class SqliteJumpType : Sqlite
LogB.SQL(mycmd.CommandText.ToString());
mycmd.ExecuteNonQuery();
if(! dbconOpened) {
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
@@ -253,7 +253,7 @@ public class SqliteJumpType : Sqlite
else if(filter == "nonTC") { whereString = " WHERE startIn == 1 "; }
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.JumpTypeTable + " " +
@@ -287,7 +287,7 @@ public class SqliteJumpType : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
int numRows;
if(allJumpsName != "") {
@@ -311,7 +311,7 @@ public class SqliteJumpType : Sqlite
public string[] SelectJumpRjTypes(string allJumpsName, bool onlyName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.JumpRjTypeTable + " " +
" ORDER BY uniqueID";
@@ -343,7 +343,7 @@ public class SqliteJumpType : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
int numRows;
if(allJumpsName != "") {
@@ -366,7 +366,7 @@ public class SqliteJumpType : Sqlite
public JumpType SelectAndReturnJumpType(string typeName, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.JumpTypeTable + " " +
" WHERE name = \"" + typeName +
@@ -390,7 +390,7 @@ public class SqliteJumpType : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myJumpType;
}
@@ -398,7 +398,7 @@ public class SqliteJumpType : Sqlite
public JumpType SelectAndReturnJumpRjType(string typeName, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.JumpRjTypeTable + " " +
" WHERE name = \"" + typeName +
@@ -433,7 +433,7 @@ public class SqliteJumpType : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myJumpType;
}
@@ -441,7 +441,7 @@ public class SqliteJumpType : Sqlite
//tableName is jumpType or jumpRjType
public bool HasWeight(string tableName, string typeName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT weight " +
" FROM " + tableName +
" WHERE name == \"" + typeName + "\"";
@@ -462,14 +462,14 @@ public class SqliteJumpType : Sqlite
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return hasWeight;
}
//we know if it has fall if it starts in
public bool HasFall(string tableName, string typeName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT startIn " +
" FROM " + tableName +
" WHERE name == \"" + typeName + "\"";
@@ -487,41 +487,41 @@ public class SqliteJumpType : Sqlite
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return hasFall;
}
//updates name
public void Update(string nameOld, string nameNew)
{
- //Sqlite.Open();
+ //SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE jumpType SET name = \"" + nameNew +
"\" WHERE name == \"" + nameOld + "\"";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- //Sqlite.Close();
+ //SqliteGeneral.Sqlite.Close();
}
public void UpdateOther(string column, string typeName, string newValue)
{
- //Sqlite.Open();
+ //SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE jumpType SET " + column + " = \"" + newValue +
"\" WHERE name == \"" + typeName + "\"";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- //Sqlite.Close();
+ //SqliteGeneral.Sqlite.Close();
}
public void Delete(string tableName, string name, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "Delete FROM " + tableName +
" WHERE name == \"" + name + "\"";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 78afeee..2b0d26f 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -53,6 +53,8 @@ public sealed class SqliteGeneral
private static SqlitePersonSessionNotUpload m_sqlitePersonSessionNotUpload;
private static SqliteEncoder m_sqliteEncoder;
private static SqliteEvent m_sqliteEvent;
+ private static SqliteCountry m_sqliteCountry;
+ private static SqliteStat m_sqliteStat;
public SqliteGeneral()
{
@@ -249,6 +251,20 @@ public sealed class SqliteGeneral
return m_sqliteEvent;
}
}
+ public static SqliteCountry SqliteCountry
+ {
+ get
+ {
+ return m_sqliteCountry;
+ }
+ }
+ public static SqliteStat SqliteStat
+ {
+ get
+ {
+ return m_sqliteStat;
+ }
+ }
}
public class Sqlite
@@ -744,8 +760,8 @@ public class Sqlite
//SqliteGeneral.SqlitePulse.createTable(Constants.PulseTable);
sqlitePulseObject.createTable(Constants.PulseTable);
- SqlitePulseType.createTablePulseType();
- SqlitePulseType.initializeTablePulseType();
+ SqliteGeneral.SqlitePulseType.createTablePulseType();
+ SqliteGeneral.SqlitePulseType.initializeTablePulseType();
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.42", true);
LogB.SQL("Converted DB to 0.42 (added pulse and pulseType tables)");
@@ -756,7 +772,7 @@ public class Sqlite
if(currentVersion == "0.42") {
SqliteGeneral.Sqlite.Open();
- SqlitePulseType.Insert ("Free:-1:-1:free PulseStep mode", true);
+ SqliteGeneral.SqlitePulseType.Insert ("Free:-1:-1:free PulseStep mode",
true);
SqliteGeneral.SqlitePreferences.Insert ("language", "es-ES");
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.43", true);
LogB.SQL("Converted DB to 0.43 (added 'free' pulseType & language
peference)");
@@ -785,7 +801,7 @@ public class Sqlite
if(currentVersion == "0.45") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.JumpTypeInsert ("Free:1:0:Free jump", true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("Free:1:0:Free jump", true);
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.46", true);
LogB.SQL("Added Free jump type");
SqliteGeneral.Sqlite.Close();
@@ -821,7 +837,7 @@ public class Sqlite
if(currentVersion == "0.48") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.JumpTypeInsert ("Rocket:1:0:Rocket jump", true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("Rocket:1:0:Rocket jump", true);
string [] iniRunTypes = {
"Agility-20Yard:18.28:20Yard Agility test",
@@ -852,12 +868,12 @@ public class Sqlite
if(currentVersion == "0.49") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.Update ("SJ+", "SJl");
- SqliteJumpType.Update ("CMJ+", "CJl");
- SqliteJumpType.Update ("ABK+", "ABKl");
+ SqliteGeneral.SqliteJumpType.Update ("SJ+", "SJl");
+ SqliteGeneral.SqliteJumpType.Update ("CMJ+", "CJl");
+ SqliteGeneral.SqliteJumpType.Update ("ABK+", "ABKl");
SqliteGeneral.SqliteJump.ChangeWeightToL();
- SqliteJumpType.AddGraphLinks();
- SqliteJumpType.AddGraphLinksRj();
+ SqliteGeneral.SqliteJumpType.AddGraphLinks();
+ SqliteGeneral.SqliteJumpType.AddGraphLinksRj();
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.50", true);
LogB.SQL("changed SJ+ to SJl, same for CMJ+ and ABK+, added jump and jumpRj
graph links");
SqliteGeneral.Sqlite.Close();
@@ -876,7 +892,7 @@ public class Sqlite
if(currentVersion == "0.51") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.Update ("CJl", "CMJl");
+ SqliteGeneral.SqliteJumpType.Update ("CJl", "CMJl");
SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", "jump_cmj_l.png",
true);
SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", "jump_abk_l.png",
true);
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.52", true);
@@ -1104,7 +1120,7 @@ public class Sqlite
}
if(currentVersion == "0.61") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.JumpRjTypeInsert ("RJ(hexagon):1:0:1:18:Reactive Jump on a
hexagon until three full revolutions are done", true);
+ SqliteGeneral.SqliteJumpType.JumpRjTypeInsert ("RJ(hexagon):1:0:1:18:Reactive
Jump on a hexagon until three full revolutions are done", true);
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.62", true);
LogB.SQL("Converted DB to 0.62 added hexagon");
SqliteGeneral.Sqlite.Close();
@@ -1150,7 +1166,7 @@ public class Sqlite
if(currentVersion == "0.65") {
SqliteGeneral.Sqlite.Open();
//now runAnalysis is a multiChronopic event
- //SqliteJumpType.JumpRjTypeInsert ("RunAnalysis:0:0:1:-1:Run between two
photocells recording contact and flight times in contact platform/s. Until finish button is clicked.", true);
+ //SqliteGeneral.SqliteJumpType.JumpRjTypeInsert ("RunAnalysis:0:0:1:-1:Run
between two photocells recording contact and flight times in contact platform/s. Until finish button is
clicked.", true);
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.66", true);
@@ -1161,8 +1177,8 @@ public class Sqlite
}
if(currentVersion == "0.66") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.JumpTypeInsert ("TakeOff:0:0:Take off", true);
- SqliteJumpType.JumpTypeInsert ("TakeOffWeight:0:0:Take off with weight",
true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("TakeOff:0:0:Take off", true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("TakeOffWeight:0:0:Take off with
weight", true);
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.67", true);
@@ -1298,7 +1314,7 @@ public class Sqlite
if(currentVersion == "0.77") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.UpdateOther ("weight", Constants.TakeOffWeightName, "1");
+ SqliteGeneral.SqliteJumpType.UpdateOther ("weight",
Constants.TakeOffWeightName, "1");
Random rnd = new Random();
string machineID = rnd.Next().ToString();
@@ -1379,9 +1395,9 @@ public class Sqlite
conversionRateTotal = 2;
conversionRate = 1;
- SqliteEncoder.createTableEncoder();
- SqliteEncoder.createTableEncoderExercise();
- SqliteEncoder.initializeTableEncoderExercise();
+ SqliteGeneral.SqliteEncoder.createTableEncoder();
+ SqliteGeneral.SqliteEncoder.createTableEncoderExercise();
+ SqliteGeneral.SqliteEncoder.initializeTableEncoderExercise();
conversionRate = 2;
LogB.SQL("Created encoder tables.");
@@ -1410,7 +1426,7 @@ public class Sqlite
}
if(currentVersion == "0.84") {
SqliteGeneral.Sqlite.Open();
- SqliteJumpType.JumpTypeInsert ("slCMJ:1:0:Single-leg CMJ jump", true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("slCMJ:1:0:Single-leg CMJ jump",
true);
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.85", true);
@@ -1464,7 +1480,7 @@ public class Sqlite
if(currentVersion == "0.88") {
SqliteGeneral.Sqlite.Open();
- SqliteEncoder.addEncoderFreeExercise();
+ SqliteGeneral.SqliteEncoder.addEncoderFreeExercise();
LogB.SQL("Added encoder exercise: Free");
@@ -1489,7 +1505,7 @@ public class Sqlite
if(currentVersion == "0.90") {
SqliteGeneral.Sqlite.Open();
- SqliteEncoder.UpdateExercise(true, "Squat", "Squat", 100, "weight bar", "",
"");
+ SqliteGeneral.SqliteEncoder.UpdateExercise(true, "Squat", "Squat", 100,
"weight bar", "", "");
LogB.SQL("Encoder Squat 75% -> 100%");
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.91", true);
@@ -1511,8 +1527,8 @@ public class Sqlite
if(currentVersion == "0.92") {
SqliteGeneral.Sqlite.Open();
- SqliteEncoder.UpdateExercise(true, "Bench press", "Bench press", 0, "weight
bar", "","0.185");
- SqliteEncoder.UpdateExercise(true, "Squat", "Squat", 100, "weight bar",
"","0.31");
+ SqliteGeneral.SqliteEncoder.UpdateExercise(true, "Bench press", "Bench
press", 0, "weight bar", "","0.185");
+ SqliteGeneral.SqliteEncoder.UpdateExercise(true, "Squat", "Squat", 100,
"weight bar", "","0.31");
LogB.SQL("Added speed1RM on encoder exercise");
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.93", true);
@@ -1523,7 +1539,7 @@ public class Sqlite
if(currentVersion == "0.93") {
SqliteGeneral.Sqlite.Open();
- SqliteEncoder.createTable1RM();
+ SqliteGeneral.SqliteEncoder.createTable1RM();
LogB.SQL("Added encoder1RM table");
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.94", true);
@@ -1607,7 +1623,7 @@ public class Sqlite
foreach( EncoderSQL098 es in array) {
conversionRate = count;
- //do not use SqliteEncoder.Insert because that method maybe changes
in the future,
+ //do not use SqliteGeneral.SqliteEncoder.Insert because that method
maybe changes in the future,
//and here we need to do a conversion that works from 0.98 to 0.99
dbcmd.CommandText = "INSERT INTO " + Constants.EncoderTable +
" (uniqueID, personID, sessionID, exerciseID, eccon,
laterality, extraWeight, " +
@@ -1637,9 +1653,9 @@ public class Sqlite
if(currentVersion == "0.99") {
SqliteGeneral.Sqlite.Open();
- SqliteEncoder.putEncoderExerciseAnglesAt90();
- SqliteEncoder.addEncoderJumpExercise();
- SqliteEncoder.addEncoderInclinedExercises();
+ SqliteGeneral.SqliteEncoder.putEncoderExerciseAnglesAt90();
+ SqliteGeneral.SqliteEncoder.addEncoderJumpExercise();
+ SqliteGeneral.SqliteEncoder.addEncoderInclinedExercises();
LogB.SQL("Added Free and inclinedExercises");
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.00", true);
@@ -1676,7 +1692,7 @@ public class Sqlite
SqliteGeneral.Sqlite.Open();
DeleteFromName(true, Constants.EncoderExerciseTable, "Inclinated plane
Custom");
- SqliteEncoder.removeEncoderExerciseAngles();
+ SqliteGeneral.SqliteEncoder.removeEncoderExerciseAngles();
LogB.SQL("Updated encoder exercise, angle is now on encoder configuration");
SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.03", true);
@@ -1704,7 +1720,7 @@ public class Sqlite
foreach(EncoderSQL103 es in array) {
conversionRate = count;
- //do not use SqliteEncoder.Insert because that method maybe changes
in the future,
+ //do not use SqliteGeneral.SqliteEncoder.Insert because that method
maybe changes in the future,
//and here we need to do a conversion that works from 1.03 to 1.04
dbcmd.CommandText = "INSERT INTO " + Constants.EncoderTable +
" (uniqueID, personID, sessionID, exerciseID, eccon,
laterality, extraWeight, " +
@@ -1749,11 +1765,11 @@ public class Sqlite
if(currentVersion == "1.05") {
SqliteGeneral.Sqlite.Open();
- SqliteEncoder.createTableEncoderSignalCurve();
+ SqliteGeneral.SqliteEncoder.createTableEncoderSignalCurve();
- ArrayList signals = SqliteEncoder.Select(true, -1, -1, -1,
Constants.EncoderGI.ALL,
+ ArrayList signals = SqliteGeneral.SqliteEncoder.Select(true, -1, -1, -1,
Constants.EncoderGI.ALL,
-1, "signal", EncoderSQL.Eccons.ALL, false, false);
- ArrayList curves = SqliteEncoder.Select(true, -1, -1, -1,
Constants.EncoderGI.ALL,
+ ArrayList curves = SqliteGeneral.SqliteEncoder.Select(true, -1, -1, -1,
Constants.EncoderGI.ALL,
-1, "curve", EncoderSQL.Eccons.ALL, false, false);
int signalID;
conversionRateTotal = signals.Count;
@@ -1770,7 +1786,7 @@ public class Sqlite
foreach(EncoderSQL c in curves) {
conversionSubRate ++;
if(s.GetDate(false) == c.GetDate(false) && s.eccon ==
c.eccon) {
- int msCentral = SqliteEncoder.FindCurveInSignal(
+ int msCentral =
SqliteGeneral.SqliteEncoder.FindCurveInSignal(
s.GetFullURL(false),
c.GetFullURL(false));
signalID = Convert.ToInt32(s.uniqueID);
@@ -1802,7 +1818,7 @@ public class Sqlite
Constants.EncoderTable,
Convert.ToInt32(c.uniqueID));
} else {
curvesStored.Add(msCentral);
- SqliteEncoder.SignalCurveInsert(true,
+
SqliteGeneral.SqliteEncoder.SignalCurveInsert(true,
signalID,
Convert.ToInt32(c.uniqueID), msCentral);
}
}
@@ -2209,10 +2225,10 @@ public class Sqlite
//jump Types
creationRate ++;
- SqliteJumpType.createTableJumpType();
- SqliteJumpType.createTableJumpRjType();
- SqliteJumpType.initializeTableJumpType();
- SqliteJumpType.initializeTableJumpRjType();
+ SqliteGeneral.SqliteJumpType.createTableJumpType();
+ SqliteGeneral.SqliteJumpType.createTableJumpRjType();
+ SqliteGeneral.SqliteJumpType.initializeTableJumpType();
+ SqliteGeneral.SqliteJumpType.initializeTableJumpRjType();
//runs
creationRate ++;
@@ -2251,11 +2267,11 @@ public class Sqlite
//encoder
creationRate ++;
- SqliteEncoder.createTableEncoder();
- SqliteEncoder.createTableEncoderSignalCurve();
- SqliteEncoder.createTableEncoderExercise();
- SqliteEncoder.initializeTableEncoderExercise();
- SqliteEncoder.createTable1RM();
+ SqliteGeneral.SqliteEncoder.createTableEncoder();
+ SqliteGeneral.SqliteEncoder.createTableEncoderSignalCurve();
+ SqliteGeneral.SqliteEncoder.createTableEncoderExercise();
+ SqliteGeneral.SqliteEncoder.initializeTableEncoderExercise();
+ SqliteGeneral.SqliteEncoder.createTable1RM();
//sports
creationRate ++;
@@ -2668,7 +2684,7 @@ public class Sqlite
conversionRate ++;
}
- //used to delete persons (if needed) when a session is deleted. See SqliteSession.DeleteAllStuff
+ //used to delete persons (if needed) when a session is deleted. See
SqliteGeneral.SqliteSession.DeleteAllStuff
protected internal void deleteOrphanedPersons()
{
dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonTable;
@@ -2685,12 +2701,12 @@ public class Sqlite
foreach(int personID in myArray) {
//if person is not in other sessions, delete it from DB
- if(! SqlitePersonSession.PersonExistsInPS(true, personID))
+ if(! SqliteGeneral.SqlitePersonSession.PersonExistsInPS(true, personID))
Delete(true, Constants.PersonTable, personID);
}
}
- //used to delete persons (if needed) when a session is deleted. See SqliteSession.DeleteAllStuff
+ //used to delete persons (if needed) when a session is deleted. See
SqliteGeneral.SqliteSession.DeleteAllStuff
//also used to convert to sqlite 0.73
//this is old method (before .77), now use above method
protected internal void deleteOrphanedPersonsOld()
@@ -2753,8 +2769,8 @@ public class Sqlite
SqliteGeneral.Sqlite.Open();
//create new jump types
- SqliteJumpType.JumpTypeInsert ("DJa:0:0:DJ jump using arms", true);
- SqliteJumpType.JumpTypeInsert ("DJna:0:0:DJ jump without using arms", true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("DJa:0:0:DJ jump using arms", true);
+ SqliteGeneral.SqliteJumpType.JumpTypeInsert ("DJna:0:0:DJ jump without using arms", true);
//add auto-converted on description
dbcmd.CommandText = "UPDATE jump SET description = description || \" Auto-converted from DJ\"
WHERE type == \"DJ\"";
@@ -2767,7 +2783,7 @@ public class Sqlite
dbcmd.ExecuteNonQuery();
//delete DJ
- SqliteJumpType.Delete(Constants.JumpTypeTable, "DJ", true);
+ SqliteGeneral.SqliteJumpType.Delete(Constants.JumpTypeTable, "DJ", true);
}
diff --git a/src/sqlite/multiChronopic.cs b/src/sqlite/multiChronopic.cs
index 8281ca2..f40304c 100644
--- a/src/sqlite/multiChronopic.cs
+++ b/src/sqlite/multiChronopic.cs
@@ -77,7 +77,7 @@ public class SqliteMultiChronopic : Sqlite
string description, int simulated)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -107,7 +107,7 @@ public class SqliteMultiChronopic : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -116,7 +116,7 @@ public class SqliteMultiChronopic : Sqlite
public string[] SelectTests(bool dbconOpened, int sessionID, int personID)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
@@ -172,7 +172,7 @@ public class SqliteMultiChronopic : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myEvents = new string[count];
count =0;
@@ -186,7 +186,7 @@ public class SqliteMultiChronopic : Sqlite
public MultiChronopic SelectMultiChronopicData(int uniqueID, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.MultiChronopicTable + " WHERE uniqueID == "
+ uniqueID;
@@ -202,14 +202,14 @@ public class SqliteMultiChronopic : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return mc;
}
public int MaxCPs(bool dbconOpened, int sessionID)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
int maxCPs = 2;
@@ -236,21 +236,21 @@ public class SqliteMultiChronopic : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return maxCPs;
}
public void Update(int eventID, int personID, string vars, string description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.MultiChronopicTable + " SET personID = " + personID
+
", vars = \"" + vars + //vars is distance on runAnalysis
"\", description = \"" + description +
"\" WHERE uniqueID == " + eventID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/oldConvert.cs b/src/sqlite/oldConvert.cs
index fe63edb..7beb3bc 100644
--- a/src/sqlite/oldConvert.cs
+++ b/src/sqlite/oldConvert.cs
@@ -138,7 +138,7 @@ class SqliteOldConvert : Sqlite
int uniqueID, int personID, int sessionID, string signalOrCurve, bool onlyActive)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string personIDStr = "";
if(personID != -1)
@@ -213,7 +213,7 @@ class SqliteOldConvert : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
@@ -285,7 +285,7 @@ class SqliteOldConvert : Sqlite
int uniqueID, int personID, int sessionID, string signalOrCurve, bool onlyActive)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string personIDStr = "";
if(personID != -1)
@@ -355,7 +355,7 @@ class SqliteOldConvert : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return array;
}
diff --git a/src/sqlite/person.cs b/src/sqlite/person.cs
index 32e2dd4..32223a1 100644
--- a/src/sqlite/person.cs
+++ b/src/sqlite/person.cs
@@ -57,7 +57,7 @@ public class SqlitePerson : Sqlite
{
LogB.SQL("going to insert");
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -81,12 +81,12 @@ public class SqlitePerson : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
- //This is like SqlitePersonSession.Selectbut this returns a Person
+ //This is like SqliteGeneral.SqlitePersonSession.Selectbut this returns a Person
public Person Select(int uniqueID) {
return Select(false, uniqueID);
@@ -94,7 +94,7 @@ public class SqlitePerson : Sqlite
public Person Select(bool dbconOpened, int uniqueID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.PersonTable + " WHERE uniqueID == " +
uniqueID;
@@ -119,7 +119,7 @@ public class SqlitePerson : Sqlite
}
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return p;
}
@@ -128,7 +128,7 @@ public class SqlitePerson : Sqlite
//select strings
public string SelectAttribute(int uniqueID, string attribute)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + attribute + " FROM " + Constants.PersonTable + " WHERE
uniqueID == " + uniqueID;
@@ -143,14 +143,14 @@ public class SqlitePerson : Sqlite
myReturn = reader[0].ToString();
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myReturn;
}
//currently only used on server
public ArrayList SelectAllPersons()
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT uniqueID, name FROM " + Constants.PersonTable;
SqliteDataReader reader;
@@ -162,7 +162,7 @@ public class SqlitePerson : Sqlite
myArray.Add ("(" + reader[0].ToString() + ") " + reader[1].ToString());
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -183,7 +183,7 @@ public class SqlitePerson : Sqlite
string tp = Constants.PersonTable;
string tps = Constants.PersonSessionTable;
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".uniqueID " +
" FROM " + tp + "," + tps +
" WHERE " + tps + ".sessionID == " + except +
@@ -199,7 +199,7 @@ public class SqlitePerson : Sqlite
arrayExcept.Add (reader[0].ToString());
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//2
//sort no case sensitive when we sort by name
@@ -209,7 +209,7 @@ public class SqlitePerson : Sqlite
sortedBy = tp + ".uniqueID" ;
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(inSession == -1) {
string nameLike = "";
if(searchFilterName != "")
@@ -264,7 +264,7 @@ finishForeach:
}
reader2.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return arrayReturn;
}
@@ -285,7 +285,7 @@ finishForeach:
string tps = Constants.PersonSessionTable;
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//session where this person is loaded
dbcmd.CommandText = "SELECT sessionID, session.Name, session.Place, session.Date " +
@@ -409,7 +409,7 @@ finishForeach:
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
ArrayList arrayAll = new ArrayList(2);
@@ -538,7 +538,7 @@ finishForeach:
public bool ExistsAndItsNotMe(int uniqueID, string personName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonTable +
" WHERE LOWER(" + Constants.PersonTable + ".name) == LOWER(\"" + personName + "\")" +
" AND uniqueID != " + uniqueID ;
@@ -557,14 +557,14 @@ finishForeach:
//LogB.SQL("exists = {0}", exists.ToString());
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return exists;
}
public void Update(Person myPerson)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.PersonTable +
" SET name = \"" + myPerson.Name +
"\", sex = \"" + myPerson.Sex +
@@ -576,7 +576,7 @@ finishForeach:
" WHERE uniqueID == " + myPerson.UniqueID;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/personSession.cs b/src/sqlite/personSession.cs
index 3a61fee..53c6de2 100644
--- a/src/sqlite/personSession.cs
+++ b/src/sqlite/personSession.cs
@@ -57,7 +57,7 @@ public class SqlitePersonSession : Sqlite
string comments)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -83,7 +83,7 @@ public class SqlitePersonSession : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -92,7 +92,7 @@ public class SqlitePersonSession : Sqlite
public double SelectAttribute(bool dbconOpened, int personID, int sessionID, string attribute)
{
if( ! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + attribute + " FROM " + Constants.PersonSessionTable +
" WHERE personID == " + personID +
@@ -110,7 +110,7 @@ public class SqlitePersonSession : Sqlite
}
reader.Close();
if( ! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myReturn;
}
@@ -119,7 +119,7 @@ public class SqlitePersonSession : Sqlite
//select doubles
public double SelectAttribute(int personID, string attribute)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + attribute + ", sessionID FROM " +
Constants.PersonSessionTable +
" WHERE personID == " + personID +
@@ -136,13 +136,13 @@ public class SqlitePersonSession : Sqlite
myReturn = Convert.ToDouble(Util.ChangeDecimalSeparator(reader[0].ToString()));
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myReturn;
}
public void Update(PersonSession ps)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.PersonSessionTable +
" SET personID = " + ps.PersonID +
", sessionID = " + ps.SessionID +
@@ -155,13 +155,13 @@ public class SqlitePersonSession : Sqlite
"\" WHERE uniqueID == " + ps.UniqueID;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//double
public void UpdateAttribute(int personID, int sessionID, string attribute, double attrValue)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.PersonSessionTable +
" SET " + attribute + " = " + Util.ConvertToPoint(attrValue) +
" WHERE personID = " + personID +
@@ -169,12 +169,12 @@ public class SqlitePersonSession : Sqlite
;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public bool PersonSelectExistsInSession(int myPersonID, int mySessionID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionTable +
" WHERE personID == " + myPersonID +
" AND sessionID == " + mySessionID ;
@@ -190,7 +190,7 @@ public class SqlitePersonSession : Sqlite
exists = true;
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return exists;
}
@@ -207,7 +207,7 @@ public class SqlitePersonSession : Sqlite
public PersonSession Select(bool dbconOpened, int personID, int sessionID)
{
if( ! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tps = Constants.PersonSessionTable;
@@ -242,7 +242,7 @@ public class SqlitePersonSession : Sqlite
reader.Close();
if( ! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return ps;
}
@@ -259,7 +259,7 @@ public class SqlitePersonSession : Sqlite
if(returnPersonAndPSlist)
tpsString = ", " + tps + ".* ";
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".*" + tpsString +
" FROM " + tp + ", " + tps +
" WHERE " + tps + ".sessionID == " + sessionID +
@@ -301,14 +301,14 @@ public class SqlitePersonSession : Sqlite
myArray.Add (person);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
public void DeletePersonFromSessionAndTests(string sessionID, string personID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//1.- first delete in personSession77 at this session
@@ -392,7 +392,7 @@ public class SqlitePersonSession : Sqlite
Util.FileDelete(eSQL.GetFullURL(false)); //signal, don't convertPathToR
if(eSQL.future2 != "")
Util.FileDelete(eSQL.future2); //video
- Sqlite.Delete(true, Constants.EncoderTable, Convert.ToInt32(eSQL.uniqueID));
+ SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable,
Convert.ToInt32(eSQL.uniqueID));
}
encoderArray = SqliteEncoder.Select(
@@ -406,7 +406,7 @@ public class SqlitePersonSession : Sqlite
if(eSQL.future2 != "")
Util.FileDelete(eSQL.future2);
*/
- Sqlite.Delete(true, Constants.EncoderTable, Convert.ToInt32(eSQL.uniqueID));
+ SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable,
Convert.ToInt32(eSQL.uniqueID));
SqliteEncoder.DeleteSignalCurveWithCurveID(true, Convert.ToInt32(eSQL.uniqueID));
}
@@ -414,13 +414,13 @@ public class SqlitePersonSession : Sqlite
//4.- TODO: delete videos
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public bool PersonExistsInPS(bool dbconOpened, int personID)
{
if( ! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionTable +
" WHERE personID == " + personID;
@@ -440,7 +440,7 @@ public class SqlitePersonSession : Sqlite
reader.Close();
if( ! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return exists;
}
@@ -476,7 +476,7 @@ class SqlitePersonSessionTransaction : Sqlite
public void doTransaction()
{
LogB.SQL("Starting transaction");
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
using(SqliteTransaction tr = dbcon.BeginTransaction())
{
@@ -507,7 +507,7 @@ class SqlitePersonSessionTransaction : Sqlite
tr.Commit();
}
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
LogB.SQL("Ended transaction");
}
}
diff --git a/src/sqlite/personSessionNotUpload.cs b/src/sqlite/personSessionNotUpload.cs
index 45ba5a3..6876c47 100644
--- a/src/sqlite/personSessionNotUpload.cs
+++ b/src/sqlite/personSessionNotUpload.cs
@@ -46,7 +46,7 @@ public class SqlitePersonSessionNotUpload : Sqlite
public ArrayList SelectAll(int sessionID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT personID FROM " + Constants.PersonNotUploadTable +
" WHERE sessionID == " + sessionID;
LogB.SQL(dbcmd.CommandText.ToString());
@@ -60,30 +60,30 @@ public class SqlitePersonSessionNotUpload : Sqlite
myArray.Add (reader[0].ToString());
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
public void Add(int personID, int sessionID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "INSERT INTO " + Constants.PersonNotUploadTable +
" (personID, sessionID)" +
" VALUES (" + personID + ", " + sessionID +")";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
public void Delete(int personID, int sessionID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "Delete FROM " + Constants.PersonNotUploadTable +
" WHERE personID == " + personID + " AND sessionID == " + sessionID;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index d353b99..e94438b 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -121,19 +121,19 @@ public class SqlitePreferences : Sqlite
//Called from initialize
public void Insert(string myName, string myValue, SqliteCommand mycmd)
{
- //Sqlite.Open();
+ //SqliteGeneral.Sqlite.Open();
mycmd.CommandText = "INSERT INTO " + Constants.PreferencesTable +
" (name, value) VALUES (\"" +
myName + "\", \"" + myValue + "\")" ;
LogB.SQL(mycmd.CommandText.ToString());
mycmd.ExecuteNonQuery();
- //Sqlite.Close();
+ //SqliteGeneral.Sqlite.Close();
}
public void Update(string myName, string myValue, bool dbconOpened)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.PreferencesTable +
" SET value = \"" + myValue +
@@ -142,7 +142,7 @@ public class SqlitePreferences : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//Called from most of all old Chronojump methods
@@ -154,7 +154,7 @@ public class SqlitePreferences : Sqlite
public string Select (string myName, bool dbconOpened)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT value FROM " + Constants.PreferencesTable +
" WHERE name == \"" + myName + "\"" ;
@@ -173,14 +173,14 @@ public class SqlitePreferences : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myReturn;
}
public Preferences SelectAll ()
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.PreferencesTable;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
@@ -293,7 +293,7 @@ public class SqlitePreferences : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return preferences;
}
diff --git a/src/sqlite/pulse.cs b/src/sqlite/pulse.cs
index 5a66eaf..9c1e39a 100644
--- a/src/sqlite/pulse.cs
+++ b/src/sqlite/pulse.cs
@@ -60,7 +60,7 @@ public class SqlitePulse : Sqlite
public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
string type, double fixedPulse, int totalPulsesNum, string timeString, string description, int simulated)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -80,7 +80,7 @@ public class SqlitePulse : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -90,7 +90,7 @@ public class SqlitePulse : Sqlite
public string[] SelectPulses(bool dbconOpened, int sessionID, int personID)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
@@ -134,7 +134,7 @@ public class SqlitePulse : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myPulses = new string[count];
count =0;
@@ -148,7 +148,7 @@ public class SqlitePulse : Sqlite
public Pulse SelectPulseData(int uniqueID, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.PulseTable + " WHERE uniqueID == " +
uniqueID;
@@ -163,20 +163,20 @@ public class SqlitePulse : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myPulse;
}
public void Update(int pulseID, int personID, string description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.PulseTable +
" SET personID = " + personID +
", description = \"" + description +
"\" WHERE uniqueID == " + pulseID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/pulseType.cs b/src/sqlite/pulseType.cs
index f522bf7..05ac629 100644
--- a/src/sqlite/pulseType.cs
+++ b/src/sqlite/pulseType.cs
@@ -66,7 +66,7 @@ public class SqlitePulseType : Sqlite
{
string [] myStr = myPulse.Split(new char[] {':'});
if(! dbconOpened) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
}
dbcmd.CommandText = "INSERT INTO " + Constants.PulseTypeTable +
" (uniqueID, name, fixedPulse, totalPulsesNum, description)" +
@@ -76,7 +76,7 @@ public class SqlitePulseType : Sqlite
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
if(! dbconOpened) {
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
@@ -85,7 +85,7 @@ public class SqlitePulseType : Sqlite
//allPulsesName: add and "allPulsesName" value
//onlyName: return only type name
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.PulseTypeTable +
" ORDER BY uniqueID";
@@ -115,7 +115,7 @@ public class SqlitePulseType : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
int numRows;
if(allPulsesName != "") {
@@ -139,7 +139,7 @@ public class SqlitePulseType : Sqlite
public PulseType SelectAndReturnPulseType(string typeName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.PulseTypeTable +
" WHERE name = \"" + typeName +
@@ -160,7 +160,7 @@ public class SqlitePulseType : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myPulseType;
}
diff --git a/src/sqlite/reactionTime.cs b/src/sqlite/reactionTime.cs
index 0f938f8..adb3209 100644
--- a/src/sqlite/reactionTime.cs
+++ b/src/sqlite/reactionTime.cs
@@ -58,7 +58,7 @@ public class SqliteReactionTime : Sqlite
public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
string type, double time, string description, int simulated)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -78,7 +78,7 @@ public class SqliteReactionTime : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -89,7 +89,7 @@ public class SqliteReactionTime : Sqlite
Orders_by order, int limit)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
@@ -146,7 +146,7 @@ public class SqliteReactionTime : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myEvents = new string[count];
count =0;
@@ -160,7 +160,7 @@ public class SqliteReactionTime : Sqlite
public ReactionTime SelectReactionTimeData(int uniqueID, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.ReactionTimeTable + " WHERE uniqueID == " +
uniqueID;
@@ -176,13 +176,13 @@ public class SqliteReactionTime : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myRT;
}
public void Update(int eventID, string type, string time, int personID, string description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.ReactionTimeTable + " SET personID = " + personID +
", type = \"" + type +
"\", time = " + Util.ConvertToPoint(time) +
@@ -190,7 +190,7 @@ public class SqliteReactionTime : Sqlite
"\" WHERE uniqueID == " + eventID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/run.cs b/src/sqlite/run.cs
index 6a912c9..6287adb 100644
--- a/src/sqlite/run.cs
+++ b/src/sqlite/run.cs
@@ -60,7 +60,7 @@ public class SqliteRun : Sqlite
public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
string type, double distance, double time, string description, int simulated, bool initialSpeed)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -81,7 +81,7 @@ public class SqliteRun : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -94,7 +94,7 @@ public class SqliteRun : Sqlite
Orders_by order, int limit)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
@@ -157,7 +157,7 @@ public class SqliteRun : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myRuns = new string[count];
count =0;
@@ -171,7 +171,7 @@ public class SqliteRun : Sqlite
public Run SelectRunData(int uniqueID, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.RunTable + " WHERE uniqueID == " + uniqueID;
@@ -187,13 +187,13 @@ public class SqliteRun : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myRun;
}
public string [] SelectTestMaxStuff(int personID, RunType runType)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT session.date, session.name, MAX(distance/time), run.simulated " +
" FROM run, session WHERE type = \"" + runType.Name + "\" AND personID = " + personID
+
@@ -209,14 +209,14 @@ public class SqliteRun : Sqlite
string [] str = DataReaderToStringArray(reader, 4);
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return str;
}
public void Update(int runID, string type, string distance, string time, int personID, string
description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.RunTable +
" SET personID = " + personID +
", type = \"" + type +
@@ -226,7 +226,7 @@ public class SqliteRun : Sqlite
"\" WHERE uniqueID == " + runID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/runInterval.cs b/src/sqlite/runInterval.cs
index 44d5d22..307afef 100644
--- a/src/sqlite/runInterval.cs
+++ b/src/sqlite/runInterval.cs
@@ -57,7 +57,7 @@ public class SqliteRunInterval : SqliteRun
public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID,
string type, double distanceTotal, double timeTotal, double distanceInterval, string intervalTimesString,
double tracks, string description, string limited, int simulated, bool initialSpeed )
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -84,7 +84,7 @@ public class SqliteRunInterval : SqliteRun
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -92,7 +92,7 @@ public class SqliteRunInterval : SqliteRun
public new string[] SelectRuns(bool dbconOpened, int sessionID, int personID, string filterType)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string tp = Constants.PersonTable;
@@ -149,7 +149,7 @@ public class SqliteRunInterval : SqliteRun
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myRuns = new string[count];
count =0;
@@ -165,7 +165,7 @@ public class SqliteRunInterval : SqliteRun
//tableName can be runInterval or tempRunInterval
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + tableName + " WHERE uniqueID == " + uniqueID;
@@ -180,20 +180,20 @@ public class SqliteRunInterval : SqliteRun
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myRun;
}
public void Update(int runID, int personID, string description)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.RunIntervalTable +
" SET personID = " + personID +
", description = \"" + description +
"\" WHERE uniqueID == " + runID ;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
diff --git a/src/sqlite/runType.cs b/src/sqlite/runType.cs
index 70da879..71c4c12 100644
--- a/src/sqlite/runType.cs
+++ b/src/sqlite/runType.cs
@@ -118,7 +118,7 @@ public class SqliteRunType : Sqlite
{
//string [] myStr = myRun.Split(new char[] {':'});
if(! dbconOpened) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
}
mycmd.CommandText = "INSERT INTO " + tableName +
" (uniqueID, name, distance, description)" +
@@ -138,7 +138,7 @@ public class SqliteRunType : Sqlite
int myLast = Convert.ToInt32(mycmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened) {
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
return myLast;
}
@@ -146,7 +146,7 @@ public class SqliteRunType : Sqlite
public RunType SelectAndReturnRunType(string typeName, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.RunTypeTable +
" WHERE name = \"" + typeName +
@@ -170,7 +170,7 @@ public class SqliteRunType : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myRunType;
}
@@ -182,7 +182,7 @@ public class SqliteRunType : Sqlite
string whereString = "";
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.RunTypeTable +
whereString +
@@ -212,7 +212,7 @@ public class SqliteRunType : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
int numRows;
if(allRunsName != "") {
@@ -236,7 +236,7 @@ public class SqliteRunType : Sqlite
public double Distance (string typeName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT distance " +
" FROM " + Constants.RunTypeTable +
" WHERE name == \"" + typeName + "\"";
@@ -252,7 +252,7 @@ public class SqliteRunType : Sqlite
distance = Convert.ToDouble(reader[0].ToString());
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return distance;
}
@@ -263,12 +263,12 @@ public class SqliteRunType : Sqlite
{
dbcmdTr.Transaction = tr;
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "20m", "run_simple.png",
true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "100m", "run_simple.png",
true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "200m", "run_simple.png",
true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "400m", "run_simple.png",
true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "1000m", "run_simple.png",
true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "2000m", "run_simple.png",
true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "20m",
"run_simple.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "100m",
"run_simple.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "200m",
"run_simple.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "400m",
"run_simple.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "1000m",
"run_simple.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "2000m",
"run_simple.png", true, dbcmdTr);
}
tr.Commit();
}
@@ -281,13 +281,13 @@ public class SqliteRunType : Sqlite
{
dbcmdTr.Transaction = tr;
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-20Yard",
"agility_20yard.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-505",
"agility_505.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-Illinois",
"agility_illinois.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-Shuttle-Run",
"agility_shuttle.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-ZigZag",
"agility_zigzag.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Margaria", "margaria.png",
true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT",
"gesell_dbt.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable,
"Agility-20Yard", "agility_20yard.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-505",
"agility_505.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable,
"Agility-Illinois", "agility_illinois.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable,
"Agility-Shuttle-Run", "agility_shuttle.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable,
"Agility-ZigZag", "agility_zigzag.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "Margaria",
"margaria.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT",
"gesell_dbt.png", true, dbcmdTr);
}
tr.Commit();
}
@@ -296,12 +296,12 @@ public class SqliteRunType : Sqlite
public void Delete(string name)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "Delete FROM " + Constants.RunTypeTable +
" WHERE name == \"" + name + "\"";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
@@ -435,11 +435,11 @@ public class SqliteRunIntervalType : SqliteRunType
//Called from initialize
public new int Insert(RunType t, string tableName, bool dbconOpened, SqliteCommand mycmd)
{
- //done here for not having twho Sqlite.Opened
+ //done here for not having twho SqliteGeneral.Sqlite.Opened
//double distance = t.Distance;
if(! dbconOpened) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
}
mycmd.CommandText = "INSERT INTO " + tableName +
" (uniqueID, name, distance, tracksLimited, fixedValue, unlimited,
description, distancesString)" +
@@ -456,14 +456,14 @@ public class SqliteRunIntervalType : SqliteRunType
int myLast = Convert.ToInt32(mycmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened) {
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
return myLast;
}
public string[] SelectRunIntervalTypes(string allRunsName, bool onlyName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.RunIntervalTypeTable +
" ORDER BY uniqueID";
@@ -496,7 +496,7 @@ public class SqliteRunIntervalType : SqliteRunType
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
int numRows;
if(allRunsName != "") {
@@ -519,7 +519,7 @@ public class SqliteRunIntervalType : SqliteRunType
public RunType SelectAndReturnRunIntervalType(string typeName, bool dbconOpened)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * " +
" FROM " + Constants.RunIntervalTypeTable +
" WHERE name = \"" + typeName +
@@ -552,7 +552,7 @@ public class SqliteRunIntervalType : SqliteRunType
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myRunType;
}
@@ -564,14 +564,14 @@ public class SqliteRunIntervalType : SqliteRunType
{
dbcmdTr.Transaction = tr;
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "byLaps",
"run_interval.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "byTime",
"run_interval.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "unlimited",
"run_interval.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "20m10times",
"run_interval.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "7m30seconds",
"run_interval.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "20m endurance",
"run_interval.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "MTGUG",
"mtgug.png", true, dbcmdTr);
- SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "Agility-3L3R",
"agility_3l3r.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"byLaps", "run_interval.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"byTime", "run_interval.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"unlimited", "run_interval.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"20m10times", "run_interval.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"7m30seconds", "run_interval.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "20m
endurance", "run_interval.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"MTGUG", "mtgug.png", true, dbcmdTr);
+ SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable,
"Agility-3L3R", "agility_3l3r.png", true, dbcmdTr);
}
tr.Commit();
}
@@ -579,12 +579,12 @@ public class SqliteRunIntervalType : SqliteRunType
public void Delete(string name)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "Delete FROM " + Constants.RunIntervalTypeTable +
" WHERE name == \"" + name + "\"";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
diff --git a/src/sqlite/server.cs b/src/sqlite/server.cs
index d8c949b..afcc150 100644
--- a/src/sqlite/server.cs
+++ b/src/sqlite/server.cs
@@ -67,7 +67,7 @@ public class SqliteServer : Sqlite
public int InsertPing(bool dbconOpened, int evaluatorID, string cjVersion, string osVersion, string
ip, DateTime date)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string uniqueID = "NULL";
@@ -90,7 +90,7 @@ public class SqliteServer : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -99,7 +99,7 @@ public class SqliteServer : Sqlite
int countryID, string chronometer, string device, string comments, bool confiable)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string uniqueID = "NULL";
@@ -128,7 +128,7 @@ public class SqliteServer : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -137,7 +137,7 @@ public class SqliteServer : Sqlite
int countryID, string chronometer, string device, string comments, bool confiable)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.ServerEvaluatorTable + " " +
" SET code = \"" + code +
"\" , name = \"" + name +
@@ -153,7 +153,7 @@ public class SqliteServer : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
@@ -161,7 +161,7 @@ public class SqliteServer : Sqlite
//if confiable is read on client, it will be also checked on server
public ServerEvaluator SelectEvaluator(int myUniqueID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.ServerEvaluatorTable + " WHERE uniqueID == "
+ myUniqueID ;
LogB.SQL(dbcmd.CommandText.ToString());
@@ -187,13 +187,13 @@ public class SqliteServer : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myEval;
}
public string [] SelectEvaluators(bool addAnyString)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " +
Constants.ServerEvaluatorTable + ".uniqueID, " +
Constants.ServerEvaluatorTable + ".name " +
@@ -212,12 +212,12 @@ public class SqliteServer : Sqlite
evals.Add(reader[0].ToString() + ":" + reader[1].ToString());
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return Util.ArrayListToString(evals);
}
public string Query(string str) {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = str;
LogB.SQL(dbcmd.CommandText.ToString());
@@ -231,14 +231,14 @@ public class SqliteServer : Sqlite
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myReturn;
}
public string [] Stats() {
ArrayList stats = new ArrayList();
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
/*
* is good to add the string stuff like "Pings"
@@ -246,19 +246,19 @@ public class SqliteServer : Sqlite
* depending if it matches what want to show.
* Maintain the ':' as separator
*/
- stats.Add("Pings:" + Sqlite.Count(Constants.ServerPingTable, true).ToString());
- stats.Add("Evaluators:" + Sqlite.Count(Constants.ServerEvaluatorTable, true).ToString());
- stats.Add("Sessions:" + Sqlite.Count(Constants.SessionTable, true).ToString());
- stats.Add("Persons:" + Sqlite.Count(Constants.PersonTable, true).ToString());
- stats.Add("Jumps:" + Sqlite.Count(Constants.JumpTable, true).ToString());
- stats.Add("JumpsRj:" + Sqlite.Count(Constants.JumpRjTable, true).ToString());
- stats.Add("Runs:" + Sqlite.Count(Constants.RunTable, true).ToString());
- stats.Add("RunsInterval:" + Sqlite.Count(Constants.RunIntervalTable, true).ToString());
- stats.Add("ReactionTimes:" + Sqlite.Count(Constants.ReactionTimeTable, true).ToString());
- stats.Add("Pulses:" + Sqlite.Count(Constants.PulseTable, true).ToString());
- stats.Add("MultiChronopic:" + Sqlite.Count(Constants.MultiChronopicTable, true).ToString());
+ stats.Add("Pings:" + SqliteGeneral.Sqlite.Count(Constants.ServerPingTable, true).ToString());
+ stats.Add("Evaluators:" + SqliteGeneral.Sqlite.Count(Constants.ServerEvaluatorTable,
true).ToString());
+ stats.Add("Sessions:" + SqliteGeneral.Sqlite.Count(Constants.SessionTable, true).ToString());
+ stats.Add("Persons:" + SqliteGeneral.Sqlite.Count(Constants.PersonTable, true).ToString());
+ stats.Add("Jumps:" + SqliteGeneral.Sqlite.Count(Constants.JumpTable, true).ToString());
+ stats.Add("JumpsRj:" + SqliteGeneral.Sqlite.Count(Constants.JumpRjTable, true).ToString());
+ stats.Add("Runs:" + SqliteGeneral.Sqlite.Count(Constants.RunTable, true).ToString());
+ stats.Add("RunsInterval:" + SqliteGeneral.Sqlite.Count(Constants.RunIntervalTable,
true).ToString());
+ stats.Add("ReactionTimes:" + SqliteGeneral.Sqlite.Count(Constants.ReactionTimeTable,
true).ToString());
+ stats.Add("Pulses:" + SqliteGeneral.Sqlite.Count(Constants.PulseTable, true).ToString());
+ stats.Add("MultiChronopic:" + SqliteGeneral.Sqlite.Count(Constants.MultiChronopicTable,
true).ToString());
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] statsString = Util.ArrayListToString(stats);
return statsString;
@@ -270,7 +270,7 @@ public class SqliteServer : Sqlite
public string [] StatsMine() {
ArrayList stats = new ArrayList();
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
/*
* is good to add the string stuff like "Pings"
@@ -278,17 +278,17 @@ public class SqliteServer : Sqlite
* depending if it matches what want to show.
* Maintain the ':' as separator
*/
- stats.Add("Sessions:" + Sqlite.CountCondition(Constants.SessionTable, true, "serverUniqueID",
">", "0").ToString());
- stats.Add("Persons:" + Sqlite.CountCondition(Constants.PersonTable, true, "serverUniqueID",
">", "0").ToString());
- stats.Add("Jumps:" + Sqlite.CountCondition(Constants.JumpTable, true, "simulated", ">",
"0").ToString());
- stats.Add("JumpsRj:" + Sqlite.CountCondition(Constants.JumpRjTable, true, "simulated", ">",
"0").ToString());
- stats.Add("Runs:" + Sqlite.CountCondition(Constants.RunTable, true, "simulated", ">",
"0").ToString());
- stats.Add("RunsInterval:" + Sqlite.CountCondition(Constants.RunIntervalTable, true,
"simulated", ">", "0").ToString());
- stats.Add("ReactionTimes:" + Sqlite.CountCondition(Constants.ReactionTimeTable, true,
"simulated", ">", "0").ToString());
- stats.Add("Pulses:" + Sqlite.CountCondition(Constants.PulseTable, true, "simulated", ">",
"0").ToString());
- stats.Add("MultiChronopic:" + Sqlite.CountCondition(Constants.MultiChronopicTable, true,
"simulated", ">", "0").ToString());
+ stats.Add("Sessions:" + SqliteGeneral.Sqlite.CountCondition(Constants.SessionTable, true,
"serverUniqueID", ">", "0").ToString());
+ stats.Add("Persons:" + SqliteGeneral.Sqlite.CountCondition(Constants.PersonTable, true,
"serverUniqueID", ">", "0").ToString());
+ stats.Add("Jumps:" + SqliteGeneral.Sqlite.CountCondition(Constants.JumpTable, true,
"simulated", ">", "0").ToString());
+ stats.Add("JumpsRj:" + SqliteGeneral.Sqlite.CountCondition(Constants.JumpRjTable, true,
"simulated", ">", "0").ToString());
+ stats.Add("Runs:" + SqliteGeneral.Sqlite.CountCondition(Constants.RunTable, true,
"simulated", ">", "0").ToString());
+ stats.Add("RunsInterval:" + SqliteGeneral.Sqlite.CountCondition(Constants.RunIntervalTable,
true, "simulated", ">", "0").ToString());
+ stats.Add("ReactionTimes:" + SqliteGeneral.Sqlite.CountCondition(Constants.ReactionTimeTable,
true, "simulated", ">", "0").ToString());
+ stats.Add("Pulses:" + SqliteGeneral.Sqlite.CountCondition(Constants.PulseTable, true,
"simulated", ">", "0").ToString());
+ stats.Add("MultiChronopic:" +
SqliteGeneral.Sqlite.CountCondition(Constants.MultiChronopicTable, true, "simulated", ">", "0").ToString());
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] statsString = Util.ArrayListToString(stats);
return statsString;
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index d840a67..8f63b57 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -56,7 +56,7 @@ public class SqliteSession : Sqlite
public int Insert(bool dbconOpened, string tableName, string uniqueID, string name, string place,
DateTime date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int
serverUniqueID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -77,14 +77,14 @@ public class SqliteSession : Sqlite
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
protected internal void insertSimulatedSession()
{
- if(! Sqlite.Exists (true, Constants.SessionTable, Constants.SessionSimulatedName))
+ if(! SqliteGeneral.Sqlite.Exists (true, Constants.SessionTable,
Constants.SessionSimulatedName))
Insert(true, Constants.SessionTable, "-1", Constants.SessionSimulatedName, "",
DateTime.Today,
Constants.SportUndefinedID, Constants.SpeciallityUndefinedID,
Constants.LevelUndefinedID,
Catalog.GetString("Use this session to simulate tests."),
Constants.ServerUndefinedID);
@@ -93,7 +93,7 @@ public class SqliteSession : Sqlite
public void Update(int uniqueID, string name, string place, DateTime date, int personsSportID, int
personsSpeciallityID, int personsPractice, string comments)
{
//TODO: serverUniqueID (but cannot be changed in gui/edit, then not need now)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.SessionTable + " " +
" SET name = \"" + name +
"\" , date = \"" + UtilDate.ToSql(date) +
@@ -104,14 +104,14 @@ public class SqliteSession : Sqlite
", comments = \"" + comments +
"\" WHERE uniqueID == " + uniqueID;
dbcmd.ExecuteNonQuery();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
//updating local session when it gets uploaded
public void UpdateServerUniqueID(int uniqueID, int serverID)
{
//if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " +Constants.SessionTable + " SET serverUniqueID = " + serverID +
" WHERE uniqueID == " + uniqueID ;
@@ -119,7 +119,7 @@ public class SqliteSession : Sqlite
dbcmd.ExecuteNonQuery();
//if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
@@ -139,12 +139,12 @@ public class SqliteSession : Sqlite
public Session SelectDo(SqliteCommand mydbcmd)
{
try {
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
} catch {
//done because there's an eventual problem maybe thread related on very few starts of
chronojump
LogB.SQL("Catched dbcon problem at Session.Select");
- Sqlite.Close();
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Close();
+ SqliteGeneral.Sqlite.Open();
LogB.SQL("reopened again");
}
LogB.SQL(mydbcmd.CommandText.ToString());
@@ -172,7 +172,7 @@ public class SqliteSession : Sqlite
values[7], Convert.ToInt32(values[8]) );
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return mySession;
}
@@ -185,7 +185,7 @@ public class SqliteSession : Sqlite
selectString = " uniqueID, name, place, date ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//dbcmd.CommandText = "SELECT * FROM session ORDER BY uniqueID";
dbcmd.CommandText = "SELECT " + selectString + " FROM " + Constants.SessionTable + " " +
" WHERE uniqueID != " + sessionIdDisable + " ORDER BY uniqueID";
@@ -215,7 +215,7 @@ public class SqliteSession : Sqlite
reader.Close();
//close database connection
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] mySessions = new string[count];
count =0;
@@ -229,7 +229,7 @@ public class SqliteSession : Sqlite
public string[] SelectAllSessions(string filterName)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string filterNameString = "";
if(filterName != "")
@@ -459,7 +459,7 @@ public class SqliteSession : Sqlite
//close database connection
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
//mix nine arrayLists
string [] mySessions = new string[count];
@@ -619,7 +619,7 @@ public class SqliteSession : Sqlite
string table, string type, string valueToSelect, string statistic)
{
if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//if personIDString == -1, the applies for all persons
@@ -652,7 +652,7 @@ public class SqliteSession : Sqlite
reader.Close();
if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
if (found) {
return myReturn;
@@ -664,7 +664,7 @@ public class SqliteSession : Sqlite
public void DeleteAllStuff(string uniqueID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//delete the session
dbcmd.CommandText = "Delete FROM " + Constants.SessionTable + " WHERE uniqueID == " +
uniqueID;
@@ -674,7 +674,7 @@ public class SqliteSession : Sqlite
dbcmd.CommandText = "Delete FROM " + Constants.PersonSessionTable + " WHERE sessionID == " +
uniqueID;
dbcmd.ExecuteNonQuery();
- Sqlite.deleteOrphanedPersons();
+ SqliteGeneral.Sqlite.deleteOrphanedPersons();
//delete normal jumps
dbcmd.CommandText = "Delete FROM " + Constants.JumpTable + " WHERE sessionID == " + uniqueID;
@@ -716,7 +716,7 @@ public class SqliteSession : Sqlite
Util.FileDelete(eSQL.GetFullURL(false)); //signal, don't convertPathToR
if(eSQL.videoURL != "")
Util.FileDelete(eSQL.videoURL); //video
- Sqlite.Delete(true, Constants.EncoderTable, Convert.ToInt32(eSQL.uniqueID));
+ SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable,
Convert.ToInt32(eSQL.uniqueID));
}
//curves
@@ -731,14 +731,14 @@ public class SqliteSession : Sqlite
if(eSQL.videoURL != "")
Util.FileDelete(eSQL.videoURL);
*/
- Sqlite.Delete(true, Constants.EncoderTable, Convert.ToInt32(eSQL.uniqueID));
+ SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable,
Convert.ToInt32(eSQL.uniqueID));
SqliteEncoder.DeleteSignalCurveWithCurveID(true, Convert.ToInt32(eSQL.uniqueID));
}
//<------- delete from encoder end
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
@@ -776,7 +776,7 @@ public class SqliteServerSession : SqliteSession
public int Insert(bool dbconOpened, string tableName, string name, string place, DateTime date, int
personsSportID, int personsSpeciallityID, int personsPractice, string comments, int serverUniqueID, int
evaluatorID, string evaluatorCJVersion, string evaluatorOS, DateTime uploadedDate, int uploadingState)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//(uniqueID == "-1")
// uniqueID = "NULL";
@@ -801,7 +801,7 @@ public class SqliteServerSession : SqliteSession
int myLast = Convert.ToInt32(dbcmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -810,7 +810,7 @@ public class SqliteServerSession : SqliteSession
public void UpdateUploadingState(int uniqueID, int state)
{
//if(!dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "UPDATE " + Constants.SessionTable + " SET uploadingState = " + state +
" WHERE uniqueID == " + uniqueID ;
@@ -818,7 +818,7 @@ public class SqliteServerSession : SqliteSession
dbcmd.ExecuteNonQuery();
//if(!dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
diff --git a/src/sqlite/speciallity.cs b/src/sqlite/speciallity.cs
index e2a709a..a696e3f 100644
--- a/src/sqlite/speciallity.cs
+++ b/src/sqlite/speciallity.cs
@@ -68,7 +68,7 @@ public class SqliteSpeciallity : Sqlite
public int Insert(bool dbconOpened, SqliteCommand mycmd, int sportID, string speciallityName)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string myString = "INSERT INTO " + Constants.SpeciallityTable +
" (uniqueID, sportID, name) VALUES (NULL, " + sportID + ", \"" + speciallityName +
"\")";
@@ -84,7 +84,7 @@ public class SqliteSpeciallity : Sqlite
int myLast = Convert.ToInt32(mycmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -95,7 +95,7 @@ public class SqliteSpeciallity : Sqlite
return "";
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT name FROM " + Constants.SpeciallityTable + " WHERE uniqueID == "
+ uniqueID;
@@ -111,7 +111,7 @@ public class SqliteSpeciallity : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return Catalog.GetString(speciallityName);
}
@@ -122,7 +122,7 @@ public class SqliteSpeciallity : Sqlite
if(sportFilter != -1)
whereString = " WHERE sportID == " + sportFilter;
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
SqliteDataReader reader;
ArrayList myArray = new ArrayList(2);
int count = 0;
@@ -145,7 +145,7 @@ public class SqliteSpeciallity : Sqlite
count ++;
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myReturn = new string[count];
count = 0;
@@ -216,7 +216,7 @@ public class SqliteSpeciallity : Sqlite
public void InsertUndefined(bool dbconOpened)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
string myString = "INSERT INTO " + Constants.SpeciallityTable +
" (uniqueID, sportID, name) VALUES (-1, -1, \"\")";
@@ -225,6 +225,6 @@ public class SqliteSpeciallity : Sqlite
dbcmd.ExecuteNonQuery();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
}
}
diff --git a/src/sqlite/sport.cs b/src/sqlite/sport.cs
index d7fd1bb..9c88aec 100644
--- a/src/sqlite/sport.cs
+++ b/src/sqlite/sport.cs
@@ -77,7 +77,7 @@ public class SqliteSport : Sqlite
public int Insert(bool dbconOpened, SqliteCommand mycmd, string uniqueID, string name, bool
userDefined, bool hasSpeciallities, string graphLink)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
if(uniqueID == "-1")
uniqueID = "NULL";
@@ -98,7 +98,7 @@ public class SqliteSport : Sqlite
int myLast = Convert.ToInt32(mycmd.ExecuteScalar()); // Need to type-cast since
`ExecuteScalar` returns an object.
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myLast;
}
@@ -106,7 +106,7 @@ public class SqliteSport : Sqlite
public Sport Select(bool dbconOpened, int uniqueID)
{
if(! dbconOpened)
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT * FROM " + Constants.SportTable + " WHERE uniqueID == " +
uniqueID;
@@ -128,14 +128,14 @@ public class SqliteSport : Sqlite
reader.Close();
if(! dbconOpened)
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return mySport;
}
public int SelectID(string name)
{
- //Sqlite.Open();
+ //SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.SportTable + " WHERE name == \"" +
name + "\"";
@@ -148,14 +148,14 @@ public class SqliteSport : Sqlite
int myID = Convert.ToInt32(reader[0]);
reader.Close();
- //Sqlite.Close();
+ //SqliteGeneral.Sqlite.Close();
return myID;
}
public string [] SelectAll()
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
SqliteDataReader reader;
ArrayList myArray = new ArrayList(2);
int count = 0;
@@ -179,7 +179,7 @@ public class SqliteSport : Sqlite
count ++;
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
string [] myReturn = new string[count];
count = 0;
diff --git a/src/sqlite/stat.cs b/src/sqlite/stat.cs
index b34ff24..bfa779a 100644
--- a/src/sqlite/stat.cs
+++ b/src/sqlite/stat.cs
@@ -26,7 +26,7 @@ using Mono.Unix;
using Mono.Data.Sqlite;
-class SqliteStat : Sqlite
+public class SqliteStat : Sqlite
{
//sj, cmj, abk (no sj+)
//AllJumpsName (simple) is not managed here, is done in SjCmjAbkPlus
@@ -62,7 +62,7 @@ class SqliteStat : Sqlite
orderByString = orderByString + tp + ".name, sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, sessionID, " + moreSelect +
fromString +
sessionString +
@@ -107,7 +107,7 @@ class SqliteStat : Sqlite
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -153,7 +153,7 @@ class SqliteStat : Sqlite
orderByString = orderByString + "" + tp + ".name, jump.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, jump.sessionID, " + moreSelect +
fromString +
sessionString +
@@ -213,7 +213,7 @@ class SqliteStat : Sqlite
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -314,7 +314,7 @@ class SqliteStat : Sqlite
orderByString = orderByString + tp + ".name, jump.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, jump.sessionID, " + moreSelect +
fromString +
sessionString +
@@ -378,7 +378,7 @@ class SqliteStat : Sqlite
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -420,7 +420,7 @@ class SqliteStat : Sqlite
orderByString = orderByString + tp + ".name, jumpRj.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, sessionID, " + moreSelect +
//" FROM jumpRj, person " +
fromString +
@@ -473,7 +473,7 @@ class SqliteStat : Sqlite
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -517,7 +517,7 @@ class SqliteStat : Sqlite
orderByString = orderByString + tp + ".name, jumpRj.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, sessionID, " + moreSelect +
fromString +
sessionString +
@@ -575,7 +575,7 @@ class SqliteStat : Sqlite
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -583,7 +583,7 @@ class SqliteStat : Sqlite
//for rjEvolution (to know the number of columns)
public int ObtainMaxNumberOfJumps (string sessionString)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT MAX(jumps) from jumpRj " + sessionString +
"group by jumps order by jumps DESC limit 1";
//this is done because if no jumps, and we don't write last line, it returns a blank
line
@@ -600,7 +600,7 @@ class SqliteStat : Sqlite
myReturn = Convert.ToInt32(reader[0].ToString());
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
if (found) {
return myReturn;
@@ -612,7 +612,7 @@ class SqliteStat : Sqlite
//for start/RunIntervallic (to know the number of columns)
public int ObtainMaxNumberOfRuns (string sessionString)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT MAX(tracks) from runInterval " + sessionString +
"group by tracks order by tracks DESC limit 1";
//this is done because if no jumps, and we don't write last line, it returns a blank
line
@@ -631,7 +631,7 @@ class SqliteStat : Sqlite
myReturn = Convert.ToInt32(Math.Floor(Convert.ToDouble(reader[0].ToString())));
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
if (found) {
return myReturn;
@@ -703,7 +703,7 @@ class SqliteStat : Sqlite
orderByString = orderByString + tp + ".name, jumpRj.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, sessionID, " + moreSelect +
fromString +
sessionString +
@@ -765,7 +765,7 @@ class SqliteStat : Sqlite
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -811,7 +811,7 @@ class SqliteStat : Sqlite
// orderByString = orderByString + tp + ".name, jumpRj.sessionID, ";
//}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, sessionID, " + moreSelect +
fromString +
sessionString +
@@ -866,7 +866,7 @@ LogB.SQL(intervalSpeeds);
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -906,7 +906,7 @@ LogB.SQL(intervalSpeeds);
orderByString = orderByString + tp + ".name, j1.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, j1.sessionID, " + moreSelect +
" FROM jump AS j1, jump AS j2, " + tp + " " +
sessionString +
@@ -949,7 +949,7 @@ LogB.SQL(intervalSpeeds);
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -983,7 +983,7 @@ LogB.SQL(intervalSpeeds);
orderByString = orderByString + tp + ".name, j1.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, j1.sessionID, " + moreSelect +
" FROM jump AS j1, jump AS j2, " + tp + " " +
sessionString +
@@ -1027,7 +1027,7 @@ LogB.SQL(intervalSpeeds);
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -1061,7 +1061,7 @@ LogB.SQL(intervalSpeeds);
orderByString = orderByString + tp + ".name, j1.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, j1.sessionID, " + moreSelect +
" FROM jump AS j1, jump AS j2, " + tp + " " +
sessionString +
@@ -1111,7 +1111,7 @@ LogB.SQL(intervalSpeeds);
);
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -1216,7 +1216,7 @@ LogB.SQL(intervalSpeeds);
orderByString = orderByString + "jump.sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, jump.sessionID, " + moreSelect +
fromString +
sessionString +
@@ -1286,7 +1286,7 @@ LogB.SQL(intervalSpeeds);
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -1328,7 +1328,7 @@ LogB.SQL(intervalSpeeds);
orderByString = orderByString + tp + ".name, sessionID, ";
}
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
dbcmd.CommandText = "SELECT " + tp + ".name, " + tp + ".sex, sessionID, " + moreSelect +
fromString +
sessionString +
@@ -1373,7 +1373,7 @@ LogB.SQL(intervalSpeeds);
}
}
reader.Close();
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return myArray;
}
@@ -1385,7 +1385,7 @@ LogB.SQL(intervalSpeeds);
/*
public ArrayList SelectChronojumpProfile (string sessionID)
{
- Sqlite.Open();
+ SqliteGeneral.Sqlite.Open();
//select personID and personName (IDNameList)
IDNameList idNameList = fillIDNameList(
@@ -1445,7 +1445,7 @@ LogB.SQL(intervalSpeeds);
ArrayList arrayReturn = superlist.GetArray();
LogB.SQL("end of superlist");
- Sqlite.Close();
+ SqliteGeneral.Sqlite.Close();
return arrayReturn;
}
*/
diff --git a/src/stats/jumpIndexes.cs b/src/stats/jumpIndexes.cs
index 322f75b..5585d37 100644
--- a/src/stats/jumpIndexes.cs
+++ b/src/stats/jumpIndexes.cs
@@ -96,11 +96,11 @@ public class StatJumpIndexes : Stat
if(statsJumpsType == 3) { //avg of each jumper
if(multisession) {
processDataMultiSession (
- SqliteStat.JumpIndexes(sessionString, multisession, "AVG(",
")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
+ SqliteGeneral.SqliteStat.JumpIndexes(sessionString,
multisession, "AVG(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
true, sessions.Count);
} else {
processDataSimpleSession ( cleanDontWanted (
- SqliteStat.JumpIndexes(sessionString, multisession,
"AVG(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
+ SqliteGeneral.SqliteStat.JumpIndexes(sessionString,
multisession, "AVG(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
statsJumpsType, limit),
true, dataColumns);
}
@@ -108,10 +108,10 @@ public class StatJumpIndexes : Stat
//if more than on session, show only the avg or max of each jump/jumper
//some of this options are never called becase we don't allow radiobutton all and
limit (only avg and best)
if(multisession) {
- processDataMultiSession ( SqliteStat.JumpIndexes(sessionString, multisession,
"MAX(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
+ processDataMultiSession ( SqliteGeneral.SqliteStat.JumpIndexes(sessionString,
multisession, "MAX(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
true, sessions.Count);
} else {
- processDataSimpleSession ( SqliteStat.JumpIndexes(sessionString,
multisession, "MAX(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
+ processDataSimpleSession (
SqliteGeneral.SqliteStat.JumpIndexes(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex,
useHeightsOnJumpIndexes),
true, dataColumns);
}
}
diff --git a/src/stats/rjIndex.cs b/src/stats/rjIndex.cs
index 9285365..2c46448 100644
--- a/src/stats/rjIndex.cs
+++ b/src/stats/rjIndex.cs
@@ -74,14 +74,14 @@ public class StatRjIndex : Stat
if(multisession) {
string operation = "AVG";
processDataMultiSession (
- SqliteStat.RjIndex(sessionString, multisession,
+ SqliteGeneral.SqliteStat.RjIndex(sessionString, multisession,
//"AVG(", ")", showSex),
operation, jumpType, showSex),
true, sessions.Count);
} else {
string operation = "AVG";
processDataSimpleSession ( cleanDontWanted (
- SqliteStat.RjIndex(sessionString, multisession,
+ SqliteGeneral.SqliteStat.RjIndex(sessionString,
multisession,
//"AVG(", ")", showSex),
operation, jumpType, showSex),
statsJumpsType, limit),
@@ -91,7 +91,7 @@ public class StatRjIndex : Stat
//if more than on session, show only the avg or max of each jump/jumper
if(multisession) {
string operation = "MAX";
- processDataMultiSession ( SqliteStat.RjIndex(sessionString, multisession,
+ processDataMultiSession ( SqliteGeneral.SqliteStat.RjIndex(sessionString,
multisession,
//"MAX(", ")", showSex),
operation, jumpType, showSex),
true, sessions.Count);
@@ -99,7 +99,7 @@ public class StatRjIndex : Stat
string operation = ""; //no need of "MAX", there's an order by (index) desc
//and clenaDontWanted will do his work
processDataSimpleSession ( cleanDontWanted (
- SqliteStat.RjIndex(sessionString, multisession,
+ SqliteGeneral.SqliteStat.RjIndex(sessionString,
multisession,
//"", "", showSex),
operation, jumpType, showSex),
statsJumpsType, limit),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]