Class | DBI::Handle |
In: |
lib/dbi/handles.rb
|
Parent: | Object |
convert_types | [RW] | |
handle | [R] | |
trace_mode | [R] | |
trace_output | [R] |
# 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
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
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