Sha256: 301f055c5c960fc23c1b9ff5db7f7d8227e270e9f6ff7e5ab94eee9fc2003b21

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

require 'jdbc_common'
require 'db/postgres'

class PostgresTableAliasLengthTest < Test::Unit::TestCase
  
  def test_table_alias_length
    result = ActiveRecord::Base.connection.select_one("SELECT 1 AS " + "a" * 2048)

    actual_table_alias_length = result.keys.first.size
    actual_table_alias_length = 0 if actual_table_alias_length == 2048
   
    assert_equal(actual_table_alias_length,
                 ActiveRecord::Base.connection.table_alias_length)
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-1.3.0.beta2 test/db/postgres/table_alias_length_test.rb
activerecord-jdbc-adapter-1.3.0.beta1 test/db/postgres/table_alias_length_test.rb