Class: DBI::Handle

### Home Classes Methods

### In Files

- lib/dbi/handles.rb

### Parent

Object

### Methods

- ::new
- #func
- #trace

### 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::Handle

Base class for all handles.

### Attributes

convert_types[RW]
handle[R]
trace_mode[R]
trace_output[R]

### Public Class Methods

new(handle, convert_types=true) click to toggle source

    # File lib/dbi/handles.rb, line 14
    def initialize(handle, convert_types=true)
        @handle = handle
        @trace_mode = @trace_output = nil
        @convert_types = convert_types
    end

### Public Instance Methods

func(function, *values) click to toggle source

Leverage a driver-specific method. The method name will have "__" prepended to them before calling, and the DBD must define them as such for them to work.

    # File lib/dbi/handles.rb, line 33
    def func(function, *values)
        if @handle.respond_to?("__" + function.to_s) then
            @handle.send("__" + function.to_s, *values)
        else
            raise InterfaceError, "Driver specific function <#{function}> not available."
        end
    rescue ArgumentError
        raise InterfaceError, "Wrong # of arguments for driver specific function"
    end

trace(mode=nil, output=nil) click to toggle source

Please seee DBI.trace.

    # File lib/dbi/handles.rb, line 21
    def trace(mode=nil, output=nil)
        # FIXME trace
        raise InterfaceError, "the trace module has been removed until it actually works."
        @trace_mode   = mode   || @trace_mode   || DBI::DEFAULT_TRACE_MODE
        @trace_output = output || @trace_output || DBI::DEFAULT_TRACE_OUTPUT
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.