Forum: Ruby Perl's DBI::quote functionality?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A70b7da5a3a712e800100e61ef8d8917?d=identicon&s=25 akonsu (Guest)
on 2005-12-06 00:30
(Received via mailing list)
hello,

does anyone know of any modules that would allow me to "prepare" sql
strings? something similar to perl's DBI::quote?

thanks
konstantin
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-12-06 00:58
(Received via mailing list)
ActiveRecord::Base has 'quote' and 'sanitize' methods, among others.
A70b7da5a3a712e800100e61ef8d8917?d=identicon&s=25 akonsu (Guest)
on 2005-12-06 01:39
(Received via mailing list)
thanks. is this a part of rails?
9c7f2f44463d1d4890f73e8a8229dd29?d=identicon&s=25 caleb (Guest)
on 2005-12-06 01:47
(Received via mailing list)
>
> does anyone know of any modules that would allow me to "prepare" sql
> strings? something similar to perl's DBI::quote?

Did you check out ruby-dbi?

http://ruby-dbi.sourceforge.net/

Caleb
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 gregory.t.brown (Guest)
on 2005-12-06 01:47
(Received via mailing list)
On 12/5/05, ako... <akonsu@gmail.com> wrote:
> thanks. is this a part of rails?

ActiveRecord can be used with or without rails.  It is in rails by
default, of course.

Below is an article on how to use it without rails:

http://wiki.rubyonrails.com/rails/pages/HowToUseAc...
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 halostatue (Guest)
on 2005-12-06 04:01
(Received via mailing list)
On 12/5/05, ako... <akonsu@gmail.com> wrote:
> does anyone know of any modules that would allow me to "prepare" sql
> strings? something similar to perl's DBI::quote?

Yes. DBI#quote.

-austin
This topic is locked and can not be replied to.