Module: ADBC::StatementOpenable

Included in:
Statement, ADBCArrow::Statement
Defined in:
lib/adbc/statement-openable.rb

Instance Method Summary collapse

Instance Method Details

#open(connection) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/adbc/statement-openable.rb', line 20

def open(connection)
  statement = new(connection)
  if block_given?
    begin
      yield(statement)
    ensure
      statement.release
    end
  else
    statement
  end
end