Sha256: b20177691bc9d6c9a108070c262a702c601dda5fb33e14bb6d5b3b4ee4981cda

Contents?: true

Size: 689 Bytes

Versions: 17

Compression:

Stored size: 689 Bytes

Contents

RSpec.describe ROM::Relation, '#qualified_columns' do
  subject(:relation) { container.relations.users }

  include_context 'users and tasks'

  before do
    conf.relation(:users) do
      schema(infer: true)

      def sorted
        order(:id)
      end
    end
  end

  with_adapters do
    it 'returns qualified column names' do
      columns = relation.sorted.prefix(:user).qualified_columns

      expect(columns).to eql([:users__id___user_id, :users__name___user_name])
    end

    it 'returns projected qualified column names' do
      columns = relation.sorted.project(:id).prefix(:user).qualified_columns

      expect(columns).to eql([:users__id___user_id])
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rom-sql-1.3.1 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.3.0 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.2.2 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.2.1 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.2.0 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.1.2 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.1.1 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.1.0 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.3 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.2 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.1 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.0 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.0.rc2 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.0.rc1 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.0.beta3 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.0.beta2 spec/unit/relation/qualified_columns_spec.rb
rom-sql-1.0.0.beta1 spec/unit/relation/qualified_columns_spec.rb