On Mar 18, 12:24 am, David Lee <[email protected]> wrote:
> I know I can do this:
>
>   Item.dataset.full_text_search [:name], 'Search Stuff'
>
> But this returns hashes instead of Item objects. I was wondering if we
> can have this:
>
>   Item.full_text_search [:name], 'Search Stuff'

  Item.dataset.full_text_search([:name], 'Search Stuff').all

Should return Item objects.  I looked at the code for all adapters
that support full_text_search, and they all just add a filter.  The
reason that you can't do Item.full_text_search is that there isn't a
full_text_search dataset method defined for the model.  This is
because not all databases support it.  You can add it easily using:

  Item.def_dataset_method(:full_text_search)

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to