Class: NusaDB::Statement
- Inherits:
-
Object
- Object
- NusaDB::Statement
- Defined in:
- lib/nusadb/connection.rb
Overview
A prepared statement handle.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #execute(params = []) ⇒ Object
-
#initialize(connection, name) ⇒ Statement
constructor
A new instance of Statement.
Constructor Details
#initialize(connection, name) ⇒ Statement
Returns a new instance of Statement.
528 529 530 531 |
# File 'lib/nusadb/connection.rb', line 528 def initialize(connection, name) @connection = connection @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
526 527 528 |
# File 'lib/nusadb/connection.rb', line 526 def name @name end |
Instance Method Details
#execute(params = []) ⇒ Object
533 534 535 |
# File 'lib/nusadb/connection.rb', line 533 def execute(params = []) @connection.run_prepared(@name, params) end |