Class: DBI::BaseDriver

### Home Classes Methods

### In Files

- lib/dbi/base_classes/driver.rb

### Parent

Base

### Methods

- ::new
- #connect
- #data_sources
- #default_attributes
- #default_user
- #disconnect_all

### Files

- ChangeLog
- LICENSE
- README

### Class/Module Index

Quicksearch

- DBI
- DBI::BaseDatabase
- DBI::BaseDriver
- DBI::BaseStatement
- DBI::Binary
- DBI::ColumnInfo
- DBI::DataError
- DBI::DatabaseError
- DBI::DatabaseHandle
- DBI::Date
- DBI::DriverHandle
- DBI::Error
- DBI::Handle
- DBI::HandleTracer
- DBI::IntegrityError
- DBI::InterfaceError
- DBI::InternalError
- DBI::NotImplementedError
- DBI::NotSupportedError
- DBI::OperationalError
- DBI::ProgrammingError
- DBI::Row
- DBI::SQL
- DBI::SQL::PreparedStatement
- DBI::StatementHandle
- DBI::Time
- DBI::Timestamp
- DBI::Type
- DBI::Type::Boolean
- DBI::Type::Decimal
- DBI::Type::Float
- DBI::Type::Integer
- DBI::Type::Null
- DBI::Type::Timestamp
- DBI::Type::Varchar
- DBI::TypeUtil
- DBI::Utils
- DBI::Utils::ConvParam
- DBI::Utils::TableFormatter
- DBI::Utils::XMLFormatter
- DBI::Warning
- Class

No matching classes.

# DBI::BaseDriver

Implements the basic functionality that constitutes a Driver

Drivers do not have a direct interface exposed to the user; these methods are mostly for DBD authors.

As with DBI::BaseDatabase, "DBD Required" and "DBD Optional" will be used to explain the same requirements.

### Public Class Methods

new(dbi_version) click to toggle source

    # File lib/dbi/base_classes/driver.rb, line 12
    def initialize(dbi_version)
        major, minor = dbi_version.split(".").collect { |x| x.to_i }
        dbi_major, dbi_minor = DBI::VERSION.split(".").collect { |x| x.to_i }
        unless major == dbi_major and minor == dbi_minor
            raise InterfaceError, "Wrong DBD API version used"
        end
    end

### Public Instance Methods

connect(dbname, user, auth, attr) click to toggle source

Connect to the database. DBD Required.

    # File lib/dbi/base_classes/driver.rb, line 21
    def connect(dbname, user, auth, attr)
        raise NotImplementedError
    end

data_sources() click to toggle source

Return the data sources available to this driver. Returns an empty array per default.

    # File lib/dbi/base_classes/driver.rb, line 37
    def data_sources
        []
    end

default_attributes() click to toggle source

Default attributes to set on the DatabaseHandle.

    # File lib/dbi/base_classes/driver.rb, line 31
    def default_attributes
        {}
    end

default_user() click to toggle source

Default u/p information in an array.

    # File lib/dbi/base_classes/driver.rb, line 26
    def default_user
        ['', '']
    end

disconnect_all() click to toggle source

Disconnect all DatabaseHandles. DBD Required.

    # File lib/dbi/base_classes/driver.rb, line 42
    def disconnect_all
        raise NotImplementedError
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.