summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/switcher.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-03-13 23:59:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-03-13 23:59:29 (GMT)
commit8d8e5c02096f59a7227308a591fc5050ea5d92ff (patch)
tree15b5bc10b963d492d4393b83ccfd347230d6b41e /src/analysis/db/items/switcher.c
parentbde67ccf58fc858d5d0db4929db149ea12f50f96 (diff)
Given more flexibility to the field names of locations in XML databases.
Diffstat (limited to 'src/analysis/db/items/switcher.c')
-rw-r--r--src/analysis/db/items/switcher.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/analysis/db/items/switcher.c b/src/analysis/db/items/switcher.c
index 6497e41..de5fd36 100644
--- a/src/analysis/db/items/switcher.c
+++ b/src/analysis/db/items/switcher.c
@@ -648,7 +648,7 @@ static bool g_db_switcher_prepare_db_statement(const GDbSwitcher *switcher, boun
status = G_DB_ITEM_CLASS(g_db_switcher_parent_class)->prepare_stmt(G_DB_ITEM(switcher), values, count);
if (!status) return false;
- status = prepare_vmpa_db_statement(&switcher->addr, values, count);
+ status = prepare_vmpa_db_statement(&switcher->addr, NULL, values, count);
if (!status) return false;
*count += 2;
@@ -656,14 +656,16 @@ static bool g_db_switcher_prepare_db_statement(const GDbSwitcher *switcher, boun
value = &(*values)[*count - 2];
- value->name = "op_index";
+ value->cname = "op_index";
+ value->built_name = false;
value->type = SQLITE_INTEGER;
value->integer = switcher->index;
value->delete = NULL;
value = &(*values)[*count - 1];
- value->name = "type";
+ value->cname = "type";
+ value->built_name = false;
value->type = SQLITE_INTEGER;
value->integer = switcher->display;
value->delete = NULL;
@@ -694,7 +696,7 @@ static bool g_db_switcher_load(GDbSwitcher *switcher, const bound_value *values,
result = G_DB_ITEM_CLASS(g_db_switcher_parent_class)->load(G_DB_ITEM(switcher), values, count);
- result &= load_vmpa(&switcher->addr, values, count);
+ result &= load_vmpa(&switcher->addr, NULL, values, count);
if (result)
{
@@ -865,7 +867,7 @@ static bool g_switcher_collection_create_db_table(const GSwitcherCollection *col
sql = "CREATE TABLE Switchers (" \
SQLITE_DB_ITEM_CREATE ", " \
- SQLITE_VMPA_CREATE ", " \
+ SQLITE_SIMPLE_VMPA_CREATE ", " \
"op_index INTEGER, " \
"type INTEGER" \
");";
@@ -905,7 +907,7 @@ static bool g_switcher_collection_setup_load(GSwitcherCollection *collec, bound_
values, count);
if (!status) return false;
- if (!setup_load_for_vmpa(NULL, values, count))
+ if (!setup_load_for_vmpa(NULL, NULL, values, count))
return false;
*count += 2;
@@ -913,12 +915,14 @@ static bool g_switcher_collection_setup_load(GSwitcherCollection *collec, bound_
value = &(*values)[*count - 2];
- value->name = "op_index";
+ value->cname = "op_index";
+ value->built_name = false;
value->type = SQLITE_INTEGER;
value = &(*values)[*count - 1];
- value->name = "type";
+ value->cname = "type";
+ value->built_name = false;
value->type = SQLITE_INTEGER;
return true;