Sha256: 17e01b52de72137a1810d8c60019fb77efa5859594984acc8f8c5e0a9476f591

Contents?: true

Size: 980 Bytes

Versions: 23

Compression:

Stored size: 980 Bytes

Contents

module Rhoconnect
  module Handler
    module Query
      class PassThroughRunner < Rhoconnect::Handler::Query::Runner
        def run
          token = params[:token]
          ack_token(token) if token
          res = []
          query_result = engine.do_sync
          res = send_new_page(query_result)
          format_result(res[0],res[1],res[2],res[3])
        end
        
        def send_new_page(data)
          data ||= {}
          data.each_key do |object_id| 
            data[object_id].each { |attrib,value| data[object_id][attrib] = '' if value.nil? }
          end
          token = ''
          compute_errors_page
          res = build_page do |r|
            r['insert'] = data
            r['metadata'] = compute_metadata
          end
          if res['insert']
            token = @client.compute_token(:page_token)
          else
            _delete_errors_page 
          end    
          [token,0,data.size,res]
        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/pass_through_runner.rb
rhoconnect-7.5.1 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-7.4.1 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-7.1.17 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-6.2.0 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-6.0.11 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.18 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.17 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.15 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.0.22 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.2 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.0.7 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.0.3 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.5.0 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-5.1.1 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-4.0.4 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-4.0.3 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-4.0.2 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-4.0.1 lib/rhoconnect/handler/query/pass_through_runner.rb
rhoconnect-4.0.0 lib/rhoconnect/handler/query/pass_through_runner.rb