On Thursday, April 4, 2019 at 5:46:34 PM UTC-7, vais wrote:
>
> Hi sequel-talk,
>
>
> What’s the simplest way in Sequel to transform an SQL string containing
> placeholders into a string with those placeholders substituted with the
> appropriate values?
>
>
> So far the only way I managed to accomplish this was to create a dataset
> first, then call the sql method on it. Is there a simpler way that does not
> require creating a throw-away intermediate dataset object?
>
You can use the following:
DB.literal(Sequel.lit('? = ?', :a, 'b'))
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.