Class: Webhookdb::DBAdapter::SequelConnection

Inherits:
Connection
  • Object
show all
Includes:
Webhookdb::Dbutil
Defined in:
lib/webhookdb/db_adapter.rb

Constant Summary

Constants included from Webhookdb::Dbutil

Webhookdb::Dbutil::MOCK_CONN

Instance Method Summary collapse

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