On Nov 25, 12:28 pm, cootcraig <[email protected]> wrote:
> I'm setting up table/Model classes with associations, slick.  One of
> the tables will only be accessed through a function (Posgresql
> database function).
>
> Model for table looks like:
> class Media_set_index < Sequel::Model(:media_set_index)
>
> Postgresql function that uses the table looks like:
> Create Function next_media_set_index() Returns integer as $$ ...
>
> I've put all the sequel model classes in their own module.  I don't
> know how to do a function next_media_set_index() to fit into the
> module / sequel model classes.
>
> Help please.  RTFM is fine.

You can do the following to call the function and return the result:

  i = Media_set_index.db.get{next_media_set_index{}}
  # SELECT next_media_set_index() LIMIT 1

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