[epiphany/history-rewrite: 29/45] ephy-history-service: add create_url_from_statement()



commit ee06c349273501b5614b1ea5265fc1d0d377a1ad
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Mon Jul 18 15:27:36 2011 +0300

    ephy-history-service: add create_url_from_statement()
    
    Necessary when retrieving an url out of the database

 lib/history/ephy-history-service-urls-table.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index 91945df..e9a7994 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -199,3 +199,18 @@ ephy_history_service_update_url_row (EphyHistoryService *self, EphyHistoryURL *u
   }
   g_object_unref (statement);
 }
+
+static EphyHistoryURL *
+create_url_from_statement (EphySQLiteStatement *statement)
+{
+  EphyHistoryURL *url = ephy_history_url_new (ephy_sqlite_statement_get_column_as_string (statement, 1),
+                                              ephy_sqlite_statement_get_column_as_string (statement, 2),
+                                              ephy_sqlite_statement_get_column_as_int (statement, 3),
+                                              ephy_sqlite_statement_get_column_as_int (statement, 4),
+                                              ephy_sqlite_statement_get_column_as_int (statement, 5),
+                                              ephy_sqlite_statement_get_column_as_int (statement, 6));
+
+  url->id = ephy_sqlite_statement_get_column_as_int (statement, 0);
+
+  return url;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]