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.