Module: Sequel::DataObjects

Defined in:
lib/sequel/adapters/do.rb,
lib/sequel/adapters/do/mysql.rb,
lib/sequel/adapters/do/sqlite3.rb,
lib/sequel/adapters/do/postgres.rb

Overview

Module holding the DataObjects support for Sequel. DataObjects is a ruby library with a standard API for accessing databases.

The DataObjects adapter currently supports PostgreSQL, MySQL, and SQLite:

  • Sequel.connect(‘do:sqlite3::memory:’)

  • Sequel.connect(‘do:postgres://user:password@host/database’)

  • Sequel.connect(‘do:mysql://user:password@host/database’)

Defined Under Namespace

Modules: MySQL, Postgres, SQLite Classes: Database, Dataset

Constant Summary collapse

DATABASE_SETUP =

Contains procs keyed on subadapter type that extend the given database object so it supports the correct database type.

{}

Class Method Summary collapse

Class Method Details

.load_driver(path) ⇒ Object

Wrapper for require that raises AdapterNotFound if driver could not be loaded



19
20
21
22
23
# File 'lib/sequel/adapters/do.rb', line 19

def self.load_driver(path)
  require path
rescue LoadError => e
  raise AdapterNotFound, e.message
end