On Friday, August 12, 2016 at 7:27:48 AM UTC-7, Christian Becker wrote:
>
> Hi Folks,
>
> I'm migrating a MySQL only solution to a Multi Database Solution (MySQL,
> Postgres, SQLite, maybe more in the future) so I decided to use Sequel as a
> Wrapper. I don't use the Sequel ORM components - only create a Sequel
> Database Object and use it to read and write Data. It work's like charm -
> with one exception:
>
> I have to insert a bunch of ugly html to a Database Text field. Using
> mysql2 gem I could sanitize this by using
> Mysql2::Client.escape(place_your_ugly_string_here) but I couldn't find such
> a method in Sequel. I've tried the "literal" method but that doesn't do the
> right things with the ugly html.
>
DB.literal('string') when using the mysql2 adapter is basically
"'#{c.escape('string')}'" where c is the MySQL::Client instance, so I'm not
sure what you mean by "doesn't do the right things". Could you clarify or
provide an example?
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.