Class: Ridgepole::ExecuteExpander
- Inherits:
-
Object
- Object
- Ridgepole::ExecuteExpander
show all
- Defined in:
- lib/ridgepole/execute_expander.rb
Defined Under Namespace
Modules: ConnectionAdapterExt
Classes: Stub
Class Method Summary
collapse
Class Method Details
.expand_execute(connection) ⇒ Object
99
100
101
102
103
104
105
|
# File 'lib/ridgepole/execute_expander.rb', line 99
def expand_execute(connection)
return if connection.is_a?(ConnectionAdapterExt)
connection.class_eval do
prepend ConnectionAdapterExt
end
end
|
92
93
94
95
96
97
|
# File 'lib/ridgepole/execute_expander.rb', line 92
def ()
self. =
yield
ensure
self. = nil
end
|
.with_script(script, logger) ⇒ Object
83
84
85
86
87
88
89
90
|
# File 'lib/ridgepole/execute_expander.rb', line 83
def with_script(script, logger)
self.use_script = true
self.sql_executer = Ridgepole::ExternalSqlExecuter.new(script, logger)
yield
ensure
self.use_script = false
self.sql_executer = nil
end
|
.without_operation(callback = nil) ⇒ Object
74
75
76
77
78
79
80
81
|
# File 'lib/ridgepole/execute_expander.rb', line 74
def without_operation(callback = nil)
self.noop = true
self.callback = callback
yield
ensure
self.noop = false
self.callback = nil
end
|