| 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
14: def initialize(handle, convert_types=true)
15: @handle = handle
16: @trace_mode = @trace_output = nil
17: @convert_types = convert_types
18: 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
33: def func(function, *values)
34: if @handle.respond_to?("__" + function.to_s) then
35: @handle.send("__" + function.to_s, *values)
36: else
37: raise InterfaceError, "Driver specific function <#{function}> not available."
38: end
39: rescue ArgumentError
40: raise InterfaceError, "Wrong # of arguments for driver specific function"
41: end
Please seee DBI.trace.
# File lib/dbi/handles.rb, line 21
21: def trace(mode=nil, output=nil)
22: # FIXME trace
23: raise InterfaceError, "the trace module has been removed until it actually works."
24: @trace_mode = mode || @trace_mode || DBI::DEFAULT_TRACE_MODE
25: @trace_output = output || @trace_output || DBI::DEFAULT_TRACE_OUTPUT
26: end