[SqueakDBX] Link complains about ilike:

Alan Knight knight at acm.org
Thu Nov 11 20:04:23 UTC 2010


On 2010-11-10 11:35 PM, Mariano Martinez Peck wrote:
>
>
> On Thu, Nov 11, 2010 at 1:24 AM, Panu Suominen <panu.suominen at iki.fi 
> <mailto:panu.suominen at iki.fi>> wrote:
>
>     2010/11/11 Mariano Martinez Peck <marianopeck at gmail.com
>     <mailto:marianopeck at gmail.com>>:
>     > Hi Panu. Thanks for finding this bug. It seems a typo. Can you
>     try chaning
>     > it to #like:  instead of #ilike:  and see if the test works?
>
>     But that changes semantics. readManyOf: Something where: [:a | a name
>     like: '%bob%']
>     probably does not return any "Bob". However  [:a | a name ilike:
>     '%bob%'] should return.
>
> Sorry. I was not aware of the ILIKE SQL keyboard. Seems to be used 
> only in PostgreSQL.
> And now I read the method  RelationExpression >> operationFor: aSymbol
>
> So....you are right. We should implement #ilike:   similar to #like:  
> but  being case insensitive.
>
> However, if you check #ilike:  it is case insensitive too. Read the 
> comment of method String >> match:
>
> I am confused what we should do.
>
> mariano
I have an idea that whether or not LIKE is case sensitive will vary by 
database, so there's no way we could match that in Smalltalk. I'd be 
inclined to have the Smalltalk implementation of both just be case 
insensitive and if someone really wants a case sensitive match then they 
won't have exact polymorphism between the image code and the database, 
but they wouldn't anyway if it varies by database.

-- 
Alan Knight [|], Engineering Manager, Cincom Smalltalk
knight at acm.org
aknight at cincom.com
http://www.cincom.com/smalltalk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20101111/158a6057/attachment.htm


More information about the SqueakDBX mailing list