banshee r5197 - in trunk/banshee: . src/Libraries/Mono.Data.Sqlite src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite



Author: gburt
Date: Thu Apr  9 00:08:10 2009
New Revision: 5197
URL: http://svn.gnome.org/viewvc/banshee?rev=5197&view=rev

Log:
2009-04-08  Gabriel Burt  <gabriel burt gmail com>

	* src/Libraries/Mono.Data.Sqlite/bnc-490021_mds-even-better.patch:
	* src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs:
	Building on Bertrand's patch, improve performance even more.

Added:
   trunk/banshee/src/Libraries/Mono.Data.Sqlite/bnc-490021_mds-even-better.patch
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs

Modified: trunk/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs	(original)
+++ trunk/banshee/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs	Thu Apr  9 00:08:10 2009
@@ -582,12 +582,16 @@
       DbType t;
       if (_typeNames.TryGetValue(Name, out t)) {
         return t;
+      } else if (_typeNames.TryGetValue (Name.ToUpperInvariant (), out t)) {
+        _typeNames[Name] = t;
+        return t;
       }
       return DbType.Object;
     }
     #endregion
 
-    private static Dictionary<string, DbType> _typeNames = new Dictionary<string, DbType>(StringComparer.InvariantCultureIgnoreCase) {
+    // All the strings below must be uppercase
+    private static Dictionary<string, DbType> _typeNames = new Dictionary<string, DbType>() {
       {"COUNTER", DbType.Int64},
       {"AUTOINCREMENT", DbType.Int64},
       {"IDENTITY", DbType.Int64},

Added: trunk/banshee/src/Libraries/Mono.Data.Sqlite/bnc-490021_mds-even-better.patch
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Libraries/Mono.Data.Sqlite/bnc-490021_mds-even-better.patch	Thu Apr  9 00:08:10 2009
@@ -0,0 +1,22 @@
+diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs
+index 39569ae..863fc02 100644
+--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs
++++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConvert.cs
+@@ -582,12 +582,16 @@ namespace Mono.Data.Sqlite
+       DbType t;
+       if (_typeNames.TryGetValue(Name, out t)) {
+         return t;
++      } else if (_typeNames.TryGetValue (Name.ToUpperInvariant (), out t)) {
++        _typeNames[Name] = t;
++        return t;
+       }
+       return DbType.Object;
+     }
+     #endregion
+ 
+-    private static Dictionary<string, DbType> _typeNames = new Dictionary<string, DbType>(StringComparer.InvariantCultureIgnoreCase) {
++    // All the strings below must be uppercase
++    private static Dictionary<string, DbType> _typeNames = new Dictionary<string, DbType>() {
+       {"COUNTER", DbType.Int64},
+       {"AUTOINCREMENT", DbType.Int64},
+       {"IDENTITY", DbType.Int64},



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