On Tuesday, August 7, 2018 at 6:30:42 AM UTC-7, Ted Milker wrote:
>
> I'm starting a greenfield project accessing a legacy database and I need a 
> model that will return a subset of the table in Sequel 5.11.0.  Put another 
> away, I need to have a default WHERE clause on the data the Sequel::Model 
> will return.  All the information I can find on this subject is out of 
> date.  The only thing that I have been able to find is:
>
> self.dataset = dataset.where(..)
>
> which feels wrong but works.
>

That is the recommended way to handle this case, unless you want to use a 
database view that does the filtering instead of accessing the table 
directly.

Thanks,
Jeremy 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to