Sha256: 1581f030a583a1de685fd2ba07309dc3185293c6de95493f709065ce5565bbd2

Contents?: true

Size: 710 Bytes

Versions: 9

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

module Dbee
  module Providers
    class ActiveRecordProvider
      class ExpressionBuilder
        # Derives Arel#project predicates.
        class SelectMaker
          def make(column, arel_column, alias_maker)
            column_alias = quote(alias_maker.make(column.display))

            arel_column.as(column_alias)
          end

          private

          def quote(value)
            ActiveRecord::Base.connection.quote(value)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dbee-active_record-1.1.0 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.4 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.3 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.2 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.1 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.0 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.0.pre.alpha.2 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.0.pre.alpha.1 lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb
dbee-active_record-1.0.0.pre.alpha lib/dbee/providers/active_record_provider/expression_builder/select_maker.rb