Sha256: f6318dc0a5a1303fe0617d1738d207c22cf571c38546f7c15d90992c9f16601c

Contents?: true

Size: 805 Bytes

Versions: 23

Compression:

Stored size: 805 Bytes

Contents

module Rhoconnect
  module Handler
    module Query
      module ExecuteMethods
        def execute_query_handler(route_handler)
          content_type :json
          @handler = nil
          if not current_source.is_pass_through?
            @handler = Rhoconnect::Handler::Query::Runner.new(@model, current_client, route_handler, params)
          else
            @handler = Rhoconnect::Handler::Query::PassThroughRunner.new(@model, current_client, route_handler, params)
          end
          formatted_res = @handler.run
          response.headers[Rhoconnect::PAGE_TOKEN_HEADER] = formatted_res[1]['token']
          response.headers[Rhoconnect::PAGE_OBJECT_COUNT_HEADER] = formatted_res[2]['count'].to_s
          response.body = formatted_res.to_json     
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-7.5.1 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-7.4.1 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-7.1.17 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-6.2.0 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-6.0.11 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.18 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.17 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.15 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.0.22 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.2 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.0.7 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.0.3 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.5.0 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-5.1.1 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-4.0.4 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-4.0.3 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-4.0.2 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-4.0.1 lib/rhoconnect/handler/query/execute_methods.rb
rhoconnect-4.0.0 lib/rhoconnect/handler/query/execute_methods.rb