[f-spot] Remove fully qualified Hyena.Data.Sqlite references



commit ab3a3c9b8693812033ac7d3020a23162fac96e5b
Author: Ruben Vermeersch <ruben savanne be>
Date:   Sun Nov 14 12:47:53 2010 +0100

    Remove fully qualified Hyena.Data.Sqlite references
    
    Don't like those.

 src/Clients/MainApp/FSpot.Database/Updater.cs      |    7 ++---
 .../MainApp/FSpot.Widgets/FolderTreeModel.cs       |    4 +-
 src/Clients/MainApp/FSpot/ExportStore.cs           |    7 ++---
 src/Clients/MainApp/FSpot/JobStore.cs              |    6 +---
 src/Clients/MainApp/FSpot/MetaStore.cs             |    5 +--
 src/Clients/MainApp/FSpot/PhotoStore.cs            |   25 +++++++++----------
 src/Clients/MainApp/FSpot/RollStore.cs             |    8 ++----
 src/Clients/MainApp/FSpot/TagStore.cs              |    6 +---
 8 files changed, 29 insertions(+), 39 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot.Database/Updater.cs b/src/Clients/MainApp/FSpot.Database/Updater.cs
index 1c44b2b..4a0a0eb 100644
--- a/src/Clients/MainApp/FSpot.Database/Updater.cs
+++ b/src/Clients/MainApp/FSpot.Database/Updater.cs
@@ -36,7 +36,6 @@
 using Mono.Unix;
 using Gtk;
 using System;
-using System.Data;
 using System.Collections;
 
 using FSpot.Utils;
@@ -192,7 +191,7 @@ namespace FSpot.Database {
 					"       uri             STRING NOT NULL " +
 					")");
 
-				Hyena.Data.Sqlite.IDataReader reader = ExecuteReader (String.Format (
+				IDataReader reader = ExecuteReader (String.Format (
 						"SELECT photo_id, version_id, name, uri " +
 						"FROM {0}, photos " +
 						"WHERE photo_id = id ", tmp_versions));
@@ -561,7 +560,7 @@ namespace FSpot.Database {
 					"	UNIQUE (photo_id, version_id)\n" +
 					")");
 
-				Hyena.Data.Sqlite.IDataReader reader = ExecuteReader (String.Format (
+				IDataReader reader = ExecuteReader (String.Format (
 					"SELECT id, time, uri, description, roll_id, default_version_id, rating, md5_sum " +
 					"FROM {0} ", tmp_photos));
 
@@ -835,7 +834,7 @@ namespace FSpot.Database {
 			return db.Execute(statement);
 		}
 
-		private static Hyena.Data.Sqlite.IDataReader ExecuteReader (string statement)
+		private static IDataReader ExecuteReader (string statement)
 		{
 			return db.Query (statement);
 		}
diff --git a/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs b/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs
index 7a1225a..9c047c7 100644
--- a/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs
@@ -30,7 +30,6 @@
 //
 
 using System;
-using System.Data;
 using System.Collections.Generic;
 
 using Gtk;
@@ -40,6 +39,7 @@ using FSpot;
 using FSpot.Database;
 using FSpot.Core;
 using Hyena;
+using Hyena.Data.Sqlite;
 
 using Mono.Unix;
 
@@ -128,7 +128,7 @@ namespace FSpot.Widgets
 
 			int last_count = 0;
 
-			Hyena.Data.Sqlite.IDataReader reader = database.Database.Query (query_string);
+			IDataReader reader = database.Database.Query (query_string);
 
 			while (reader.Read ()) {
 				var base_uri = new SafeUri (reader["base_uri"].ToString (), true);
diff --git a/src/Clients/MainApp/FSpot/ExportStore.cs b/src/Clients/MainApp/FSpot/ExportStore.cs
index 17c3436..6b3bc89 100644
--- a/src/Clients/MainApp/FSpot/ExportStore.cs
+++ b/src/Clients/MainApp/FSpot/ExportStore.cs
@@ -35,7 +35,6 @@ using Gdk;
 using Gtk;
 using System.Collections;
 using System.IO;
-using System.Data;
 using System;
 using FSpot;
 using FSpot.Core;
@@ -99,7 +98,7 @@ public class ExportStore : DbStore<ExportItem> {
 			")");
 	}
 
-	private ExportItem LoadItem (Hyena.Data.Sqlite.IDataReader reader)
+	private ExportItem LoadItem (IDataReader reader)
 	{
 		return new ExportItem (Convert.ToUInt32 (reader["id"]),
 				       Convert.ToUInt32 (reader["image_id"]),
@@ -110,7 +109,7 @@ public class ExportStore : DbStore<ExportItem> {
 
 	private void LoadAllItems ()
 	{
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query("SELECT id, image_id, image_version_id, export_type, export_token FROM exports");
+		IDataReader reader = Database.Query("SELECT id, image_id, image_version_id, export_type, export_token FROM exports");
 
 		while (reader.Read ()) {
 			AddToCache (LoadItem (reader));
@@ -149,7 +148,7 @@ public class ExportStore : DbStore<ExportItem> {
 	public ArrayList GetByImageId (uint image_id, uint image_version_id)
 	{
 
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query(new HyenaSqliteCommand("SELECT id, image_id, image_version_id, export_type, export_token FROM exports WHERE image_id = ? AND image_version_id = ?",
+		IDataReader reader = Database.Query(new HyenaSqliteCommand("SELECT id, image_id, image_version_id, export_type, export_token FROM exports WHERE image_id = ? AND image_version_id = ?",
                     image_id, image_version_id));
 		ArrayList list = new ArrayList ();
 		while (reader.Read ()) {
diff --git a/src/Clients/MainApp/FSpot/JobStore.cs b/src/Clients/MainApp/FSpot/JobStore.cs
index 65c8ffb..0a7155a 100644
--- a/src/Clients/MainApp/FSpot/JobStore.cs
+++ b/src/Clients/MainApp/FSpot/JobStore.cs
@@ -31,7 +31,6 @@
 
 using System.Collections;
 using System.IO;
-using System.Data;
 using System;
 using Banshee.Kernel;
 using FSpot.Jobs;
@@ -39,7 +38,6 @@ using FSpot.Database;
 using FSpot;
 using FSpot.Core;
 using Hyena;
-
 using Hyena.Data.Sqlite;
 
 namespace FSpot {
@@ -127,7 +125,7 @@ public class JobStore : DbStore<Job> {
 			")");
 	}
 
-	private Job LoadItem (Hyena.Data.Sqlite.IDataReader reader)
+	private Job LoadItem (IDataReader reader)
 	{
 		return (Job) Activator.CreateInstance (
 				Type.GetType (reader ["job_type"].ToString ()),
@@ -140,7 +138,7 @@ public class JobStore : DbStore<Job> {
 
 	private void LoadAllItems ()
 	{
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query ("SELECT id, job_type, job_options, run_at, job_priority FROM jobs");
+		IDataReader reader = Database.Query ("SELECT id, job_type, job_options, run_at, job_priority FROM jobs");
 
 		Scheduler.Suspend ();
 		while (reader.Read ()) {
diff --git a/src/Clients/MainApp/FSpot/MetaStore.cs b/src/Clients/MainApp/FSpot/MetaStore.cs
index 8207e97..37489ca 100644
--- a/src/Clients/MainApp/FSpot/MetaStore.cs
+++ b/src/Clients/MainApp/FSpot/MetaStore.cs
@@ -33,7 +33,6 @@ using Gdk;
 using Gtk;
 using System.Collections;
 using System.IO;
-using System.Data;
 using System;
 using FSpot;
 using FSpot.Core;
@@ -117,7 +116,7 @@ public class MetaStore : DbStore<MetaItem> {
 
 	private void LoadAllItems ()
 	{
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query("SELECT id, name, data FROM meta");
+		IDataReader reader = Database.Query("SELECT id, name, data FROM meta");
 
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["id"]);
@@ -193,4 +192,4 @@ public class MetaStore : DbStore<MetaItem> {
 			LoadAllItems ();
 	}
 }
-}
\ No newline at end of file
+}
diff --git a/src/Clients/MainApp/FSpot/PhotoStore.cs b/src/Clients/MainApp/FSpot/PhotoStore.cs
index 6327aa0..36d647a 100644
--- a/src/Clients/MainApp/FSpot/PhotoStore.cs
+++ b/src/Clients/MainApp/FSpot/PhotoStore.cs
@@ -42,7 +42,6 @@ using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
-using System.Data;
 using System;
 
 using FSpot;
@@ -60,7 +59,7 @@ namespace FSpot {
 public class PhotoStore : DbStore<Photo> {
 	public int TotalPhotos {
 		get {
-			Hyena.Data.Sqlite.IDataReader reader = Database.Query("SELECT COUNT(*) AS photo_count FROM photos");
+			IDataReader reader = Database.Query("SELECT COUNT(*) AS photo_count FROM photos");
 			reader.Read ();
 			int total = Convert.ToInt32 (reader ["photo_count"]);
 			reader.Dispose ();
@@ -226,7 +225,7 @@ public class PhotoStore : DbStore<Photo> {
 
 	private void GetVersions (Photo photo)
 	{
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query(
+		IDataReader reader = Database.Query(
 			new HyenaSqliteCommand("SELECT version_id, name, base_uri, filename, import_md5, protected " +
 				      "FROM photo_versions " +
 				      "WHERE photo_id = ?",
@@ -249,7 +248,7 @@ public class PhotoStore : DbStore<Photo> {
 
 	private void GetTags (Photo photo)
 	{
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query(new HyenaSqliteCommand("SELECT tag_id FROM photo_tags WHERE photo_id = ?", photo.Id));
+		IDataReader reader = Database.Query(new HyenaSqliteCommand("SELECT tag_id FROM photo_tags WHERE photo_id = ?", photo.Id));
 
 		while (reader.Read ()) {
 			uint tag_id = Convert.ToUInt32 (reader ["tag_id"]);
@@ -260,7 +259,7 @@ public class PhotoStore : DbStore<Photo> {
 	}
 
 	private void GetAllVersions  (string ids) {
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query ("SELECT photo_id, version_id, name, base_uri, filename, import_md5, protected FROM photo_versions WHERE photo_id IN " + ids);
+		IDataReader reader = Database.Query ("SELECT photo_id, version_id, name, base_uri, filename, import_md5, protected FROM photo_versions WHERE photo_id IN " + ids);
 
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["photo_id"]);
@@ -298,7 +297,7 @@ public class PhotoStore : DbStore<Photo> {
 	}
 
 	private void GetAllTags (string ids) {
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query ("SELECT photo_id, tag_id FROM photo_tags WHERE photo_id IN " + ids);
+		IDataReader reader = Database.Query ("SELECT photo_id, tag_id FROM photo_tags WHERE photo_id IN " + ids);
 
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["photo_id"]);
@@ -329,7 +328,7 @@ public class PhotoStore : DbStore<Photo> {
 		if (photo != null)
 			return photo;
 
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query(
+		IDataReader reader = Database.Query(
 			new HyenaSqliteCommand("SELECT time, description, roll_id, default_version_id, rating " +
 				      "FROM photos " +
 				      "WHERE id = ?", id
@@ -362,7 +361,7 @@ public class PhotoStore : DbStore<Photo> {
 		var base_uri = uri.GetBaseUri ();
 		var filename = uri.GetFilename ();
 
-		Hyena.Data.Sqlite.IDataReader reader =
+		IDataReader reader =
 			Database.Query (new HyenaSqliteCommand ("SELECT id, time, description, roll_id, default_version_id, rating " +
 			                               " FROM photos " +
 			                               " LEFT JOIN photo_versions AS pv ON photos.id = pv.photo_id" +
@@ -572,7 +571,7 @@ public class PhotoStore : DbStore<Photo> {
 			where_added = true;
 		}
 
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query (query_builder.ToString());
+		IDataReader reader = Database.Query (query_builder.ToString());
 		reader.Read ();
 		int count = Convert.ToInt32 (reader ["count"]);
 		reader.Dispose();
@@ -610,7 +609,7 @@ public class PhotoStore : DbStore<Photo> {
 	private int IndexOf (string query)
 	{
 		uint timer = Log.DebugTimerStart ();
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query (query);
+		IDataReader reader = Database.Query (query);
 		int index = - 1;
 		if (reader.Read ())
 			index = Convert.ToInt32 (reader ["row_id"]);
@@ -623,7 +622,7 @@ public class PhotoStore : DbStore<Photo> {
 	{
 		uint timer = Log.DebugTimerStart ();
 		List<int> list = new List<int> ();
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query (query);
+		IDataReader reader = Database.Query (query);
 		while (reader.Read ())
 			list.Add (Convert.ToInt32 (reader ["row_id"]) - 1);
 		reader.Dispose ();
@@ -654,7 +653,7 @@ public class PhotoStore : DbStore<Photo> {
 		int minyear = Int32.MaxValue;
 		int maxyear = Int32.MinValue;
 
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query ("SELECT COUNT (*) as count, month from population GROUP BY month");
+		IDataReader reader = Database.Query ("SELECT COUNT (*) as count, month from population GROUP BY month");
 		while (reader.Read ()) {
 			string yyyymm = reader ["month"].ToString ();
 			int count = Convert.ToInt32 (reader ["count"]);
@@ -780,7 +779,7 @@ public class PhotoStore : DbStore<Photo> {
 	private Photo [] Query (HyenaSqliteCommand query)
 	{
 		uint timer = Log.DebugTimerStart ();
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query(query);
+		IDataReader reader = Database.Query(query);
 
 		List<Photo> new_photos = new List<Photo> ();
 		List<Photo> query_result = new List<Photo> ();
diff --git a/src/Clients/MainApp/FSpot/RollStore.cs b/src/Clients/MainApp/FSpot/RollStore.cs
index 5bb0d1e..09ca8e3 100644
--- a/src/Clients/MainApp/FSpot/RollStore.cs
+++ b/src/Clients/MainApp/FSpot/RollStore.cs
@@ -33,7 +33,6 @@
 
 using System.Collections;
 using System.IO;
-using System.Data;
 using System;
 
 using FSpot.Core;
@@ -42,7 +41,6 @@ using FSpot.Utils;
 using FSpot;
 
 using Hyena;
-
 using Hyena.Data.Sqlite;
 
 namespace FSpot {
@@ -82,7 +80,7 @@ public class RollStore : DbStore<Roll>
 		if (roll != null)
 			return roll;
 
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query(new HyenaSqliteCommand ("SELECT time FROM rolls WHERE id = ?", id));
+		IDataReader reader = Database.Query(new HyenaSqliteCommand ("SELECT time FROM rolls WHERE id = ?", id));
 
 		if (reader.Read ()) {
 			roll = new Roll (id, Convert.ToUInt32 (reader ["time"]));
@@ -108,7 +106,7 @@ public class RollStore : DbStore<Roll>
 	public uint PhotosInRoll (Roll roll)
 	{
 		uint number_of_photos = 0;
-		using (Hyena.Data.Sqlite.IDataReader reader = Database.Query (new HyenaSqliteCommand ("SELECT count(*) AS count FROM photos WHERE roll_id = ?", roll.Id))) {
+		using (IDataReader reader = Database.Query (new HyenaSqliteCommand ("SELECT count(*) AS count FROM photos WHERE roll_id = ?", roll.Id))) {
 			if (reader.Read ())
 				number_of_photos = Convert.ToUInt32 (reader ["count"]);
 
@@ -130,7 +128,7 @@ public class RollStore : DbStore<Roll>
 		if (limit >= 0)
 			query += " LIMIT " + limit;
 
-		using (Hyena.Data.Sqlite.IDataReader reader = Database.Query(query)) {
+		using (IDataReader reader = Database.Query(query)) {
 			while (reader.Read ()) {
 				uint id = Convert.ToUInt32 (reader["roll_id"]);
 
diff --git a/src/Clients/MainApp/FSpot/TagStore.cs b/src/Clients/MainApp/FSpot/TagStore.cs
index 9264678..53b2c51 100644
--- a/src/Clients/MainApp/FSpot/TagStore.cs
+++ b/src/Clients/MainApp/FSpot/TagStore.cs
@@ -37,7 +37,6 @@ using Mono.Unix;
 using System.Collections.Generic;
 using System.Collections;
 using System.IO;
-using System.Data;
 using System;
 using FSpot;
 using FSpot.Core;
@@ -46,7 +45,6 @@ using FSpot.Jobs;
 using FSpot.Query;
 using FSpot.Utils;
 using Hyena;
-
 using Hyena.Data.Sqlite;
 
 namespace FSpot {
@@ -162,7 +160,7 @@ public class TagStore : DbStore<Tag> {
 
 		// Pass 1, get all the tags.
 
-		Hyena.Data.Sqlite.IDataReader reader = Database.Query ("SELECT id, name, is_category, sort_priority, icon FROM tags");
+		IDataReader reader = Database.Query ("SELECT id, name, is_category, sort_priority, icon FROM tags");
 
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["id"]);
@@ -427,4 +425,4 @@ public class TagStore : DbStore<Tag> {
 		EmitChanged (tags);
 	}
 }
-}
\ No newline at end of file
+}



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