Hi all,
I’m quite new to Ruby, and I have a question:
I’m using the Postgres-ruby extention to connect to my Postgres db
(require ‘postgres’ etc)
Now I need to call existing db functions but I don’t know how…
the function I want to call is
CREATE OR REPLACE FUNCTION sdr_new.pprocess_insert(pid_process integer,
pid_client integer, pid_entity integer, pppid integer, ppid_process
integer, pnotes character varying, pstatus integer, plast_update
timestamp without time zone, plogin_usuario character varying, pip
character varying)
The DBI in ruby is a standard method of interfacing to SQL databases (it
has drivers for several of them). Advantage is that the DBI interface is
pretty much same for all supported databases so in theory you could
switch the database (and use different database driver) but your code
would not change much…
Hope this helps,
Vlad
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.