Class: Tramp::Engine::Connection
- Inherits:
-
Object
- Object
- Tramp::Engine::Connection
- Defined in:
- lib/tramp/engine/connection.rb
Instance Method Summary collapse
- #delete(sql, &block) ⇒ Object
- #execute_now(sql) ⇒ Object
-
#initialize(settings) ⇒ Connection
constructor
A new instance of Connection.
- #insert(sql, &block) ⇒ Object
- #select(sql, &block) ⇒ Object
- #update(sql, &block) ⇒ Object
Constructor Details
#initialize(settings) ⇒ Connection
Returns a new instance of Connection.
4 5 6 |
# File 'lib/tramp/engine/connection.rb', line 4 def initialize(settings) EventedMysql.settings.update(settings) end |
Instance Method Details
#delete(sql, &block) ⇒ Object
24 25 26 |
# File 'lib/tramp/engine/connection.rb', line 24 def delete(sql, &block) EventedMysql.delete sql, block end |
#execute_now(sql) ⇒ Object
8 9 10 |
# File 'lib/tramp/engine/connection.rb', line 8 def execute_now(sql) EventedMysql.execute_now sql end |
#insert(sql, &block) ⇒ Object
12 13 14 |
# File 'lib/tramp/engine/connection.rb', line 12 def insert(sql, &block) EventedMysql.insert sql, block end |
#select(sql, &block) ⇒ Object
16 17 18 |
# File 'lib/tramp/engine/connection.rb', line 16 def select(sql, &block) EventedMysql.select sql, block end |
#update(sql, &block) ⇒ Object
20 21 22 |
# File 'lib/tramp/engine/connection.rb', line 20 def update(sql, &block) EventedMysql.update sql, block end |