Class: Cql::Client::PreparedStatement
- Inherits:
-
Object
- Object
- Cql::Client::PreparedStatement
- Defined in:
- lib/cql/client.rb
Direct Known Subclasses
Instance Attribute Summary collapse
- #metadata ⇒ ResultMetadata readonly
Instance Method Summary collapse
-
#execute(*args) ⇒ nil, Cql::Client::QueryResult
Execute the prepared statement with a list of values to be bound to the statements parameters.
Instance Attribute Details
#metadata ⇒ ResultMetadata (readonly)
183 184 185 |
# File 'lib/cql/client.rb', line 183 def @metadata end |
Instance Method Details
#execute(*args) ⇒ nil, Cql::Client::QueryResult
Execute the prepared statement with a list of values to be bound to the statements parameters.
The number of arguments must equal the number of bound parameters. You can also specify options as the last argument, or a symbol as a shortcut for just specifying the consistency.
Because you can specify options, or not, there is an edge case where if the last parameter of your prepared statement is a map, and you forget to specify a value for your map, the options will end up being sent to Cassandra. Most other cases when you specify the wrong number of arguments should result in an ‘ArgumentError` or `TypeError` being raised.
rows (see {Cql::Client::QueryResult}).
212 213 |
# File 'lib/cql/client.rb', line 212 def execute(*args) end |