class DuckDB::Database
def connect
con.query('CREATE TABLE users (id INTEGER, name VARCHAR(30))')
db.connect do |con|
con = db.connect # => DuckDB::Connection
db = DuckDB::Database.open
The method yields block and disconnects the database if block given
connects database.
def connect conn = _connect return conn unless block_given? begin yield conn ensure conn.disconnect end end