Chapter 1. Getting Started with Ruby9i

Table of Contents

Choosing the API

Choosing the API

To use the native API, use the Ruby9i module directly. All classes are in the “Ruby9i” namespace.

require 'Ruby9i'
db = Ruby9i::Database.new('databasename', 'username', 'password')
# ...
   

If you prefer the DBI API, use a driver name of “Ruby9i” in the call to DBI#connect.

require 'dbi'
db = DBI.connect('dbi:Ruby9i:databasename', 'username', 'password')
# ...