Sha256: 6f10bb28809a1221a4c9eb8a14a7d06d600f58fd45be93841138c6aef7be652f

Contents?: true

Size: 827 Bytes

Versions: 33

Compression:

Stored size: 827 Bytes

Contents

module Pacer
  module Routes::RouteOperations
    def fast_group_count(hash_map = nil)
      chain_route :side_effect => :group_count, :hash_map => hash_map
    end
  end

  module SideEffect
    module GroupCount
      def hash_map=(hash_map)
        @hash_map = hash_map
      end

      def at_least(n)
        @min = n
        self
      end

      def to_h
        h = {}
        min = @min || 0
        cap.first.each do |k,v|
          h[k] = v if v >= min
        end
        h
      end

      protected

      def attach_pipe(end_pipe)
        if @hash_map
          @pipe = com.tinkerpop.pipes.sideeffect.GroupCountPipe.new @hash_map
        else
          @pipe = com.tinkerpop.pipes.sideeffect.GroupCountPipe.new
        end
        @pipe.set_starts(end_pipe) if end_pipe
        @pipe
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pacer-1.5.2-java lib/pacer/side_effect/group_count.rb
pacer-1.5.1-java lib/pacer/side_effect/group_count.rb
pacer-1.4.2-java lib/pacer/side_effect/group_count.rb
pacer-1.4.1-java lib/pacer/side_effect/group_count.rb
pacer-1.4.0-java lib/pacer/side_effect/group_count.rb
pacer-1.3.5-java lib/pacer/side_effect/group_count.rb
pacer-1.3.4-java lib/pacer/side_effect/group_count.rb
pacer-1.3.3-java lib/pacer/side_effect/group_count.rb
pacer-1.3.2-java lib/pacer/side_effect/group_count.rb
pacer-1.3.1-java lib/pacer/side_effect/group_count.rb
pacer-1.2.0-java lib/pacer/side_effect/group_count.rb
pacer-1.1.1-java lib/pacer/side_effect/group_count.rb
pacer-1.1.0-java lib/pacer/side_effect/group_count.rb