Class: Webhookdb::DBAdapter::SequelConnection
- Inherits:
-
Connection
- Object
- Connection
- Webhookdb::DBAdapter::SequelConnection
- Includes:
- Webhookdb::Dbutil
- Defined in:
- lib/webhookdb/db_adapter.rb
Constant Summary
Constants included from Webhookdb::Dbutil
Instance Method Summary collapse
- #execute(sql, **kw) ⇒ Object
-
#initialize(url) ⇒ SequelConnection
constructor
A new instance of SequelConnection.
- #using(**kw) ⇒ Object
Methods included from Webhookdb::Dbutil
borrow_conn, configured_connection_options, conn_opts, displaysafe_url, reduce_expr, take_conn
Constructor Details
#initialize(url) ⇒ SequelConnection
Returns a new instance of SequelConnection.
121 122 123 124 |
# File 'lib/webhookdb/db_adapter.rb', line 121 def initialize(url) super() @url = url end |
Instance Method Details
#execute(sql, **kw) ⇒ Object
130 131 132 133 134 |
# File 'lib/webhookdb/db_adapter.rb', line 130 def execute(sql, **kw) borrow_conn(@url, **kw) do |db| db << sql end end |
#using(**kw) ⇒ Object
126 127 128 |
# File 'lib/webhookdb/db_adapter.rb', line 126 def using(**kw, &) borrow_conn(@url, **kw, &) end |