Sha256: 6adcae9881fcadcba23d1b5e22c2538c24c468ff6e7c3b72dfb78899f88bb0f0

Contents?: true

Size: 429 Bytes

Versions: 11

Compression:

Stored size: 429 Bytes

Contents

module Martyr
  module Runtime
    class SelectOperatorForDimension < BaseOperator

      attr_reader :what, :as

      def add_select(what, as:)
        @what = what
        @as = as
      end

      private

      def handle_inner(fact_scope)
        fact_scope.decorate_scope {|scope| scope.select("#{what} AS #{as}") }
      end

      def handle_outer(wrapper)
        wrapper.add_to_select(as)
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
martyr-0.1.85.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.84.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.82.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.81.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.80.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.79.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.78.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.77.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.76.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.75.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb
martyr-0.1.74.pre lib/martyr/runtime/scope_operators/select_operator_for_dimension.rb