Method: QuasarRestClient.simple_query
- Defined in:
- lib/quasar_rest_client.rb
.simple_query(q = '', opts = {}) ⇒ Object
Call Quasar with a simple query
For the last option, :var, the hash keys match the variable name used in the query string. For example, given a query string of:
SELECT * WHERE pop < :cutoff
The var hash should have:
{ cutoff: 100 }
To set the value of the cutoff.
Example:
QuasarRestClient.simple_query(
'SELECT * WHERE pop < :cutoff',
{
limit: 10,
offset: 20,
var: {
cutoff: 100
}
}
)
69 70 71 72 |
# File 'lib/quasar_rest_client.rb', line 69 def self.simple_query(q='', opts={}) proxy = Proxy.new(q, opts) proxy.simple_query end |