Module: NusaDB
- Defined in:
- lib/nusadb.rb,
lib/nusadb/scram.rb,
lib/nusadb/protocol.rb,
lib/nusadb/connection.rb
Overview
NusaDB — pure-Ruby client for the Nusa Wire Protocol (PROTOCOL_VERSION 1.1).
Example:
conn = NusaDB.connect(host: '127.0.0.1', port: 5678, user: 'nusa-root', database: 'nusadb')
conn.query('CREATE TABLE t (id INT NOT NULL, name TEXT)')
conn.execute('INSERT INTO t VALUES ($1, $2)', [1, 'alice'])
conn.query('SELECT id, name FROM t WHERE id = $1', [1]).each { |row| p row }
conn.close
Defined Under Namespace
Modules: Protocol Classes: Connection, Notification, NusaError, Reader, Result, Scram, Statement
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
-
.connect(**options) ⇒ Object
Open a connection (see Connection#initialize for options).
Class Method Details
.connect(**options) ⇒ Object
Open a connection (see Connection#initialize for options).
20 21 22 |
# File 'lib/nusadb.rb', line 20 def self.connect(**) Connection.new(**) end |