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.
akonsu (Guest)
on 2005-12-06 01: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
vanek (Guest)
on 2005-12-06 01:58
(Received via mailing list)
ActiveRecord::Base has 'quote' and 'sanitize' methods, among others.
akonsu (Guest)
on 2005-12-06 02:39
(Received via mailing list)
thanks. is this a part of rails?
caleb (Guest)
on 2005-12-06 02: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
gregory.t.brown (Guest)
on 2005-12-06 02:47
(Received via mailing list)
On 12/5/05, ako... <removed_email_address@domain.invalid> 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...
halostatue (Guest)
on 2005-12-06 05:01
(Received via mailing list)
On 12/5/05, ako... <removed_email_address@domain.invalid> 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.