Class: DB::MySQL::Connection
- Inherits:
-
Async::Pool::Resource
- Object
- Async::Pool::Resource
- DB::MySQL::Connection
- Defined in:
- lib/db/mysql/connection.rb
Overview
This implements the interface between the underlying
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(connection_string) ⇒ Connection
constructor
A new instance of Connection.
- #next_result ⇒ Object
- #send_query(statement) ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(connection_string) ⇒ Connection
Returns a new instance of Connection.
38 39 40 41 42 43 44 |
# File 'lib/db/mysql/connection.rb', line 38 def initialize(connection_string) @native = Native::Connection.connect( connection_string, io: IO ) super() end |
Instance Method Details
#close ⇒ Object
46 47 48 49 50 |
# File 'lib/db/mysql/connection.rb', line 46 def close @native.close super end |
#next_result ⇒ Object
60 61 62 |
# File 'lib/db/mysql/connection.rb', line 60 def next_result @native.next_result end |
#send_query(statement) ⇒ Object
56 57 58 |
# File 'lib/db/mysql/connection.rb', line 56 def send_query(statement) @native.send_query(statement) end |
#status ⇒ Object
52 53 54 |
# File 'lib/db/mysql/connection.rb', line 52 def status @native.status end |