Parent

Methods

Files

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.