Class DBI::Handle
In: lib/dbi/handles.rb
Parent: Object

Base class for all handles.

Methods

func   new   trace  

Attributes

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

Public Class methods

[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

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.

[Source]

# 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

Please seee DBI.trace.

[Source]

# 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]