I’m using DataMapper in a Sinatra project. I’d like to be able to use a NOT LIKE stament in a DataMapper finder method, but cannot figure out how to do so.
One might imagine that this would work:
@people = People.all(:female => 1, :name.like.not => '%julie%')
…but DataMapper throws an error. Switching the order of not and like doesn’t help.
Any way around this?
According to the docs you can use subtraction to produce
NOTqueries:Therefore the answer would seem to be: