#948 suggestion
Ashley Moran

Support for ILIKE (PostreSQL)

Reported by Ashley Moran | July 5th, 2009 @ 06:43 AM

Currently there is no pure-Ruby way to generate an ILIKE query in DataMapper. Because LIKE is case sensitive, that means

Model.all(:name.like => "%some_text%")

will match some_text but not Some_Text.

I would like to see an explicit ILIKE syntax:

Model.all(:name.ilike => "%some_text%")

(which would behave the same as Symbol#like for other RDBMS adapters that are case-insensitive).

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) July 5th, 2009 @ 06:34 PM

    • State changed from “new” to “unconfirmed”

    Aside from RDBMS, how much support for this would there be in other storage engines that DM has adapters for?

  • Tony Pitale

    Tony Pitale July 5th, 2009 @ 07:15 PM

    I think a better feature request would be a nice way to hook and add more symbol operators. This may already exist, I'm not certain.

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) July 5th, 2009 @ 08:16 PM

    • Milestone changed from 0.10.0 to 0.10.1

    @Tony: Yeah, I plan to make the operator/query system extensible at some point, but have some other higher priority stuff with the Adapter API to sort out first. Designing a nice clean API for this is not something I want to rush through, since it will have a large impact on writing adapters.

    I'd be willing to discuss what the API will look like though if anyone is interested in kicking off what they need, and what it should look like.

    BTW: This is coming before 1.0 though for sure.

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) July 22nd, 2009 @ 03:36 PM

    • State changed from “unconfirmed” to “suggestion”
  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) October 4th, 2009 @ 09:33 PM

    • Milestone changed from 0.10.1 to 0.10.2

    [project:id#20609 not-tagged:"0.10.0" not-tagged:"0.10.1" milestone:id#51895 bulk edit command]

  • Dan Kubb (dkubb)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages