yes, Now I created one and it works. However, the joining multiple tables and fetching it's data from it or from result of a nested query is not quite intuitive.Thanks a lot Jeremy. :) Will try to create some examples and post it here.
Sudhanshu Kumar Singh Mob. +49-15171867343 On Tue, Aug 13, 2019 at 5:20 PM Jeremy Evans <[email protected]> wrote: > On Tuesday, August 13, 2019 at 1:06:43 AM UTC-7, Sudhanshu Kumar Singh > wrote: >> >> But it is not applying filter on the query when I make dataset out of >> query using <model_class>.fetch(Query) and apply filter like: >> `dataset.where(::Sequel.lit("#{column_table_name}.#{column} >= ?", >> min_value))` or `dataset.where(::Sequel.lit("#{column_table_name}.#{column} >> <= ?", max_value))` >> > > When you use `fetch`, you are creating a dataset with explicit fixed SQL, > and dataset methods that would normally modify the SQL generated do not > have effect. In your case, you should probably avoid using `fetch`, and > instead create your dataset using Sequel's dataset methods. > > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/sequel-talk/858750f5-7936-42bb-ad9b-a0cf7392b1ee%40googlegroups.com > <https://groups.google.com/d/msgid/sequel-talk/858750f5-7936-42bb-ad9b-a0cf7392b1ee%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/CAJzrcYT5Fky8dRRxyOhskmBS-O7JWa2%2BQKVoGDRE57qojC30ew%40mail.gmail.com.
