[tracker/wip/carlosg/serialize-api: 14/36] libtracker-data: Add missed GTypes in conversion
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/serialize-api: 14/36] libtracker-data: Add missed GTypes in conversion
- Date: Mon, 10 Jan 2022 10:58:35 +0000 (UTC)
commit 5a50f5f8246c1829b4692b12893a798a4959754f
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 13 01:51:31 2021 +0100
libtracker-data: Add missed GTypes in conversion
Both TrackerUri and gint types may come from TrackerResource data,
but is not handled here.
src/libtracker-data/tracker-data-update.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 35f793178..7c3069fca 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -764,6 +764,9 @@ statement_bind_gvalue (TrackerDBStatement *stmt,
case G_TYPE_STRING:
tracker_db_statement_bind_text (stmt, (*idx)++, g_value_get_string (value));
break;
+ case G_TYPE_INT:
+ tracker_db_statement_bind_int (stmt, (*idx)++, g_value_get_int (value));
+ break;
case G_TYPE_INT64:
tracker_db_statement_bind_int (stmt, (*idx)++, g_value_get_int64 (value));
break;
@@ -806,6 +809,9 @@ statement_bind_gvalue (TrackerDBStatement *stmt,
/* String with langtag */
tracker_db_statement_bind_bytes (stmt, (*idx)++, bytes);
}
+ } else if (g_strcmp0 (g_type_name (type), "TrackerUri") == 0) {
+ /* FIXME: We can't access TrackerUri GType here */
+ tracker_db_statement_bind_text (stmt, (*idx)++, g_value_get_string (value));
} else {
g_warning ("Unknown type for binding: %s\n", G_VALUE_TYPE_NAME (value));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]