banshee r4871 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Database src/Libraries/Hyena/Hyena.Query



Author: gburt
Date: Mon Dec 29 22:18:50 2008
New Revision: 4871
URL: http://svn.gnome.org/viewvc/banshee?rev=4871&view=rev

Log:
2008-12-29  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs:
	Update to new QueryField api - will probably need some work when we
	re-enable other filters (genre browser, etc).

	* src/Libraries/Hyena/Hyena.Query/QueryField.cs: Based on patch from
	FÃlix Velasco, fix case-sensitivity bug with genre and other string
	matching (BGO #555120)



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs
   trunk/banshee/src/Libraries/Hyena/Hyena.Query/QueryField.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs	Mon Dec 29 22:18:50 2008
@@ -78,10 +78,14 @@
                             field.ToSql (IntegerQueryValue.GreaterThanEqual, qv);
                             field.ToSql (IntegerQueryValue.GreaterThanEqual, qv);*/
                         } else if (qv is StringQueryValue) {
-                            sql = field.ToSql (StringQueryValue.Equal, qv, true);
+                            // TODO this might need fixing
+                            //sql = field.ToSql (StringQueryValue.Equal, qv, true);
+                            sql = field.ToSql (StringQueryValue.Equal, qv);
                         }
                     } else {
-                        sql = field.ToSql (NullQueryValue.IsNullOrEmpty, NullQueryValue.Instance, true);
+                        // TODO this might need fixing
+                        //sql = field.ToSql (NullQueryValue.IsNullOrEmpty, NullQueryValue.Instance, true);
+                        sql = field.ToSql (NullQueryValue.IsNullOrEmpty, NullQueryValue.Instance);
                     }
                     
                     if (sql != null) {

Modified: trunk/banshee/src/Libraries/Hyena/Hyena.Query/QueryField.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena/Hyena.Query/QueryField.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena/Hyena.Query/QueryField.cs	Mon Dec 29 22:18:50 2008
@@ -143,11 +143,6 @@
 
         public string ToSql (Operator op, QueryValue qv)
         {
-            return ToSql (op, qv, false);
-        }
-        
-        public string ToSql (Operator op, QueryValue qv, bool caseSensitive)
-        {
             string value = qv.ToSql () ?? String.Empty;
 
             if (op == null) op = qv.OperatorSet.First;
@@ -156,7 +151,7 @@
 
             if (no_custom_format) {
                 if (qv is StringQueryValue) {
-                    if (column_lowered || !caseSensitive) {
+                    if (column_lowered) {
                         // The column is pre-lowered, no need to call lower() in SQL
                         sb.AppendFormat ("{0} {1}", Column, String.Format (op.SqlFormat, value.ToLower ()));
                     } else {



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