Class: RDBI::Driver::Mock::DBH
- Inherits:
-
RDBI::Database
- Object
- RDBI::Database
- RDBI::Driver::Mock::DBH
- Defined in:
- lib/rdbi/driver/mock.rb
Instance Attribute Summary collapse
-
#next_action ⇒ Object
Returns the value of attribute next_action.
Instance Method Summary collapse
-
#commit(*args) ⇒ Object
XXX more methods to be defined this way.
- #new_statement(query) ⇒ Object
- #ping ⇒ Object
- #rollback ⇒ Object
Instance Attribute Details
#next_action ⇒ Object
Returns the value of attribute next_action.
44 45 46 |
# File 'lib/rdbi/driver/mock.rb', line 44 def next_action @next_action end |
Instance Method Details
#commit(*args) ⇒ Object
XXX more methods to be defined this way.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/rdbi/driver/mock.rb', line 60 def commit(*args) super(*args) ret = nil if next_action ret = next_action.call(*args) self.next_action = nil end ret end |
#new_statement(query) ⇒ Object
46 47 48 |
# File 'lib/rdbi/driver/mock.rb', line 46 def new_statement(query) Mock::STH.new(query, self) end |
#ping ⇒ Object
50 51 52 |
# File 'lib/rdbi/driver/mock.rb', line 50 def ping connected? ? 10 : nil end |
#rollback ⇒ Object
54 55 56 57 |
# File 'lib/rdbi/driver/mock.rb', line 54 def rollback super(); "rollback called" end |