summaryrefslogtreecommitdiff
path: root/src/analysis/db/items
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/db/items')
-rw-r--r--src/analysis/db/items/bookmark.c8
-rw-r--r--src/analysis/db/items/comment.c26
-rw-r--r--src/analysis/db/items/switcher.c20
3 files changed, 32 insertions, 22 deletions
diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c
index 4c93faf..c8da383 100644
--- a/src/analysis/db/items/bookmark.c
+++ b/src/analysis/db/items/bookmark.c
@@ -510,7 +510,7 @@ static bool g_db_bookmark_prepare_db_statement(const GDbBookmark *bookmark, boun
status = G_DB_ITEM_CLASS(g_db_bookmark_parent_class)->prepare_stmt(G_DB_ITEM(bookmark), values, count);
if (!status) return false;
- status = prepare_vmpa_db_statement(&bookmark->addr, values, count);
+ status = prepare_vmpa_db_statement(&bookmark->addr, NULL, values, count);
if (!status) return false;
status &= prepare_db_statement_for_rle_string(&bookmark->comment, "comment", values, count);
@@ -541,7 +541,7 @@ static bool g_db_bookmark_load(GDbBookmark *bookmark, const bound_value *values,
result = G_DB_ITEM_CLASS(g_db_bookmark_parent_class)->load(G_DB_ITEM(bookmark), values, count);
- result &= load_vmpa(&bookmark->addr, values, count);
+ result &= load_vmpa(&bookmark->addr, NULL, values, count);
result &= load_rle_string(&bookmark->comment, "comment", values, count);
@@ -752,7 +752,7 @@ static bool g_bookmark_collection_create_db_table(const GBookmarkCollection *col
sql = "CREATE TABLE Bookmarks (" \
SQLITE_DB_ITEM_CREATE ", " \
- SQLITE_VMPA_CREATE ", " \
+ SQLITE_SIMPLE_VMPA_CREATE ", " \
SQLITE_RLESTR_CREATE("comment") \
");";
@@ -790,7 +790,7 @@ static bool g_bookmark_collection_setup_load(GBookmarkCollection *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;
if (!setup_load_of_rle_string(NULL, "comment", values, count))
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index b4a1dc0..8b9c25f 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -728,7 +728,7 @@ static bool g_db_comment_prepare_db_statement(const GDbComment *comment, bound_v
status = G_DB_ITEM_CLASS(g_db_comment_parent_class)->prepare_stmt(G_DB_ITEM(comment), values, count);
if (!status) return false;
- status = prepare_vmpa_db_statement(&comment->addr, values, count);
+ status = prepare_vmpa_db_statement(&comment->addr, NULL, values, count);
if (!status) return false;
*count += 1;
@@ -736,7 +736,8 @@ static bool g_db_comment_prepare_db_statement(const GDbComment *comment, bound_v
value = &(*values)[*count - 1];
- value->name = "flags";
+ value->cname = "flags";
+ value->built_name = false;
value->type = SQLITE_INTEGER;
value->integer = comment->flags;
value->delete = NULL;
@@ -749,14 +750,16 @@ static bool g_db_comment_prepare_db_statement(const GDbComment *comment, bound_v
value = &(*values)[*count - 2];
- value->name = "inlined";
+ value->cname = "inlined";
+ value->built_name = false;
value->type = SQLITE_BOOLEAN;
value->boolean = comment->inlined;
value->delete = NULL;
value = &(*values)[*count - 1];
- value->name = "repeatable";
+ value->cname = "repeatable";
+ value->built_name = false;
value->type = SQLITE_BOOLEAN;
value->boolean = comment->repeatable;
value->delete = NULL;
@@ -787,7 +790,7 @@ static bool g_db_comment_load(GDbComment *comment, const bound_value *values, si
result = G_DB_ITEM_CLASS(g_db_comment_parent_class)->load(G_DB_ITEM(comment), values, count);
- result &= load_vmpa(&comment->addr, values, count);
+ result &= load_vmpa(&comment->addr, NULL, values, count);
if (result)
{
@@ -1028,7 +1031,7 @@ static bool g_comment_collection_create_db_table(const GCommentCollection *colle
sql = "CREATE TABLE Comments (" \
SQLITE_DB_ITEM_CREATE ", " \
- SQLITE_VMPA_CREATE ", " \
+ SQLITE_SIMPLE_VMPA_CREATE ", " \
"flags INTEGER, " \
SQLITE_RLESTR_CREATE("text") ", " \
"inlined INTEGER, " \
@@ -1070,7 +1073,7 @@ static bool g_comment_collection_setup_load(GCommentCollection *collec, bound_va
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 += 1;
@@ -1078,7 +1081,8 @@ static bool g_comment_collection_setup_load(GCommentCollection *collec, bound_va
value = &(*values)[*count - 1];
- value->name = "flags";
+ value->cname = "flags";
+ value->built_name = false;
value->type = SQLITE_INTEGER;
if (!setup_load_of_rle_string(NULL, "text", values, count))
@@ -1089,12 +1093,14 @@ static bool g_comment_collection_setup_load(GCommentCollection *collec, bound_va
value = &(*values)[*count - 2];
- value->name = "inlined";
+ value->cname = "inlined";
+ value->built_name = false;
value->type = SQLITE_BOOLEAN;
value = &(*values)[*count - 1];
- value->name = "repeatable";
+ value->cname = "repeatable";
+ value->built_name = false;
value->type = SQLITE_BOOLEAN;
return true;
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;