def execute(sql, args = nil, bulk_args = nil, http_options = {})
      @logger.debug sql
      req = Net::HTTP::Post.new('/_sql', headers)
      body = { 'stmt' => sql }
      body['args'] = args if args
      body['bulk_args'] = bulk_args if bulk_args
      req.body = body.to_json
      response = request(req, http_options)
      @logger.debug response.body

      case response.code
      when /^2\d{2}/
        ResultSet.new response.body
      else
        @logger.info(response.body)
        raise CrateRuby::CrateError, response.body
      end
    end
def execute(sql, args = nil, bulk_args = nil, http_options = {})
      @logger.debug sql
      req = Net::HTTP::Post.new('/_sql', headers)
      body = { 'stmt' => sql }
      body['args'] = args if args
      body['bulk_args'] = bulk_args if bulk_args
      req.body = body.to_json
      response = request(req, http_options)
      @logger.debug response.body

      case response.code
      when /^2\d{2}/
        ResultSet.new response.body
      else
        @logger.info(response.body)
        raise CrateRuby::CrateError, response.body
      end
    end
Executes a SQL statement against the Crate HTTP REST endpoint.
 @param [String] sql statement to execute
 @param [Array] args Array of values used for parameter substitution
 @param [Array] bulk_args List of lists containing records to be processed
 @param [Hash] http_options Net::HTTP options (open_timeout, read_timeout)
 @return [ResultSet]