ruby-plsql

Get Version

0.3.0

Ruby API for PL/SQL

What

ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
ruby-plsql support both MRI and JRuby runtime environments.
This gem requires ruby-oci8 library (if MRI is used) or Oracle JDBC driver (ojdbc14.jar) (if JRuby is used) for connection to Oracle database.

Installing

sudo gem install ruby-plsql

The basics

Read this blog post first.

Usage examples:

require "ruby_plsql"

plsql.connection = OCI8.new("hr","hr","xe")

plsql.test_uppercase('xxx')              # => "XXX"
plsql.test_uppercase(:p_string => 'xxx') # => "XXX"
plsql.test_copy("abc", nil, nil)         # => { :p_to => "abc", :p_to_double => "abcabc" }
plsql.test_copy(:p_from => "abc", :p_to => nil, :p_to_double => nil)
                                         # => { :p_to => "abc", :p_to_double => "abcabc" }
plsql.hr.test_uppercase('xxx')           # => "XXX"
plsql.test_package.test_uppercase('xxx') # => 'XXX'

plsql.logoff

See more examples in RSpec tests in spec directory of gem.

Feedback

Submit your feedback as comments here.

How to submit patches

Submit bugs and patches to Lighthouse

Source code is located at GitHub

License

This code is free to use under the terms of the MIT license.

Raimonds Simanovskis, 21st April 2009
Theme extended from Paul Battley