Using postgres's "SIMILAR TO" in a query

11 views
Skip to first unread message

Kim

unread,
Jul 2, 2010, 10:09:50 AM7/2/10
to DataMapper
I'd like to use postgreSQL's "SIMILAR TO" feature for the sake of
interpreting character classes, like "[a-c]*".

I found the ever so handy
results = Model.all(:column.like => 'regex')

but haven't found a similar similarto option.

Do I need to just hand create the query, or is there a shortcut
like .like for calling it using the .all method?

Thanks!
-kim.
Reply all
Reply to author
Forward
0 new messages