bug-gnustep
[Top][All Lists]
Advanced

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

Re: RFA/PATCH GDL2 EOQualifier fixes


From: David Ayers
Subject: Re: RFA/PATCH GDL2 EOQualifier fixes
Date: Tue, 21 Jan 2003 00:04:20 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

It's time for bed.
here's the patch...


David Ayers wrote:

Actually this isn't as straight forward as I thought:

It seems that on WO 4.5:

allQualifierOperators:
@"=", @"<>", @"<=", @"<", @">=", @">", @"like", @"caseInsensitiveLike"

Notice the "<>" instead of "!=" and the lack of "contains" (also the ordering is different, but not reflected here right now) At least some (if not most) databases do treat <> and != differently for NULL values. ( someValue != NULL evaluates to TRUE where as someValue <> NULL evaluates to FALSE )

And if we want to include "contains" then maybe we should rename it to what stringForOperatorSelector: EOQualifierOperatorContains returns on WO 4.5, which would be "doesContain".

I'm not sure how compatible we should be. But my current personal preference due to the mapping of isNotEqual to either <> or != I would prefere the current GNUstep usage of != as the docs state so that it translates to what you would expect (for isNotEqual) given a NULL value. I also would consider renaming contains to doesContain but keeping it in the list, as it is a valid qualifier operator.

Can anyone with with a more current EOF version determine if these issues have been adressed in more recent versions? The documentation states that it uses != but then again, it said that in the WO 4.5 docs also. But the docs on allQualifierOperators still omit the doesContain.

I've attached an updated patch that continues to use '!=' but renames "contains" to "doesContain". (Hmm... maybe I should have added some comments stating the discrepancy from WO behavior...)

Cheers,
Dave




_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnustep



? dev-libs/gdl2/EOControl/shared_obj
Index: dev-libs/gdl2/EOControl/EOQualifier.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOQualifier.m,v
retrieving revision 1.5
diff -u -r1.5 EOQualifier.m
--- dev-libs/gdl2/EOControl/EOQualifier.m       31 Dec 2002 16:25:10 -0000      
1.5
+++ dev-libs/gdl2/EOControl/EOQualifier.m       20 Jan 2003 23:34:49 -0000
@@ -645,12 +645,12 @@
 
 + (NSArray *)allQualifierOperators
 { // rivedere
-  return [NSArray arrayWithObjects:@"=", @"!=", @"<=", @"<", @">=", @">", 
@"contains", @"like", @"caseInsensitiveLike"];
+  return [NSArray arrayWithObjects:@"=", @"!=", @"<=", @"<", @">=", @">", 
@"doesContain", @"like", @"caseInsensitiveLike", nil];
 }
 
 + (NSArray *)relationalQualifierOperators
 { // rivedere
-  return [NSArray arrayWithObjects:@"=", @"!=", @"<=", @"<", @">=", @">"];
+  return [NSArray arrayWithObjects:@"=", @"!=", @"<=", @"<", @">=", @">", nil];
 }
 
 + (NSString *)stringForOperatorSelector: (SEL)selector
@@ -668,7 +668,7 @@
   else if (sel_eq(selector, EOQualifierOperatorGreaterThanOrEqualTo))
     return @">=";
   else if (sel_eq(selector, EOQualifierOperatorContains))
-    return @"contains";
+    return @"doesContain";
   else if (sel_eq(selector, EOQualifierOperatorLike))
     return @"like";
   else if (sel_eq(selector, EOQualifierOperatorCaseInsensitiveLike))
@@ -695,7 +695,7 @@
     return EOQualifierOperatorNotEqual;
   else if ([string isEqualToString: @"!="])
     return EOQualifierOperatorNotEqual;
-  else if ([string isEqualToString: @"contains"])
+  else if ([string isEqualToString: @"doesContain"])
     return EOQualifierOperatorContains;
   else if ([string isEqualToString: @"like"])
     return EOQualifierOperatorLike;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]