aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history/ephy-history-service-urls-table.c
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-08-27 16:26:20 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-01 02:34:01 +0800
commit54edad24dc20d71b9c4e3056533dd8ee6a10e03e (patch)
treea944c251f3cac4100dbec0fc68b171091820b905 /lib/history/ephy-history-service-urls-table.c
parent3005b30e3f657618f506eac9320cf54b86b9c0ed (diff)
downloadgsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.tar
gsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.tar.gz
gsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.tar.bz2
gsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.tar.lz
gsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.tar.xz
gsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.tar.zst
gsoc2013-epiphany-54edad24dc20d71b9c4e3056533dd8ee6a10e03e.zip
ephy-history-service: extend to support URL thumbnail time
Diffstat (limited to 'lib/history/ephy-history-service-urls-table.c')
-rw-r--r--lib/history/ephy-history-service-urls-table.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index ff8bcbdf3..fa1539b22 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -70,11 +70,11 @@ ephy_history_service_get_url_row (EphyHistoryService *self, const char *url_stri
if (url != NULL && url->id != -1) {
statement = ephy_sqlite_connection_create_statement (priv->history_database,
- "SELECT id, url, title, visit_count, typed_count, last_visit_time, hidden_from_overview FROM urls "
+ "SELECT id, url, title, visit_count, typed_count, last_visit_time, hidden_from_overview, thumbnail_update_time FROM urls "
"WHERE id=?", &error);
} else {
statement = ephy_sqlite_connection_create_statement (priv->history_database,
- "SELECT id, url, title, visit_count, typed_count, last_visit_time, hidden_from_overview FROM urls "
+ "SELECT id, url, title, visit_count, typed_count, last_visit_time, hidden_from_overview, thumbnail_update_time FROM urls "
"WHERE url=?", &error);
}
@@ -118,6 +118,7 @@ ephy_history_service_get_url_row (EphyHistoryService *self, const char *url_stri
url->typed_count = ephy_sqlite_statement_get_column_as_int (statement, 4),
url->last_visit_time = ephy_sqlite_statement_get_column_as_int (statement, 5);
url->hidden = ephy_sqlite_statement_get_column_as_int (statement, 6);
+ url->thumbnail_time = ephy_sqlite_statement_get_column_as_int (statement, 7);
g_object_unref (statement);
return url;
@@ -175,7 +176,7 @@ ephy_history_service_update_url_row (EphyHistoryService *self, EphyHistoryURL *u
g_assert (priv->history_database != NULL);
statement = ephy_sqlite_connection_create_statement (priv->history_database,
- "UPDATE urls SET title=?, visit_count=?, typed_count=?, last_visit_time=?, hidden_from_overview=? "
+ "UPDATE urls SET title=?, visit_count=?, typed_count=?, last_visit_time=?, hidden_from_overview=?, thumbnail_update_time=? "
"WHERE id=?", &error);
if (error) {
g_error ("Could not build urls table modification statement: %s", error->message);
@@ -188,7 +189,8 @@ ephy_history_service_update_url_row (EphyHistoryService *self, EphyHistoryURL *u
ephy_sqlite_statement_bind_int (statement, 2, url->typed_count, &error) == FALSE ||
ephy_sqlite_statement_bind_int (statement, 3, url->last_visit_time, &error) == FALSE ||
ephy_sqlite_statement_bind_int (statement, 4, url->hidden, &error) == FALSE ||
- ephy_sqlite_statement_bind_int (statement, 5, url->id, &error) == FALSE) {
+ ephy_sqlite_statement_bind_int (statement, 5, url->thumbnail_time, &error) == FALSE ||
+ ephy_sqlite_statement_bind_int (statement, 6, url->id, &error) == FALSE) {
g_error ("Could not modify URL in urls table: %s", error->message);
g_error_free (error);
return;