Method: Diplomat::Query#create
- Defined in:
- lib/diplomat/query.rb
#create(definition, options = {}) ⇒ String
Create a prepared query or prepared query template
31 32 33 34 35 36 37 |
# File 'lib/diplomat/query.rb', line 31 def create(definition, = {}) custom_params = [:dc] ? use_named_parameter('dc', [:dc]) : nil @raw = send_post_request(@conn, ['/v1/query'], , definition, custom_params) parse_body rescue Faraday::ClientError raise Diplomat::QueryAlreadyExists end |