activerecord-sqlserver-adapter 5.2.1 → 6.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +9 -0
  3. data/.github/issue_template.md +23 -0
  4. data/.travis.yml +6 -8
  5. data/CHANGELOG.md +22 -32
  6. data/{Dockerfile → Dockerfile.ci} +1 -1
  7. data/Gemfile +42 -41
  8. data/README.md +9 -30
  9. data/RUNNING_UNIT_TESTS.md +3 -0
  10. data/Rakefile +2 -0
  11. data/VERSION +1 -1
  12. data/activerecord-sqlserver-adapter.gemspec +25 -14
  13. data/appveyor.yml +24 -17
  14. data/docker-compose.ci.yml +7 -5
  15. data/guides/RELEASING.md +11 -0
  16. data/lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb +2 -0
  17. data/lib/active_record/connection_adapters/sqlserver/core_ext/attribute_methods.rb +2 -0
  18. data/lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb +2 -0
  19. data/lib/active_record/connection_adapters/sqlserver/core_ext/explain.rb +3 -1
  20. data/lib/active_record/connection_adapters/sqlserver/core_ext/explain_subscriber.rb +2 -0
  21. data/lib/active_record/connection_adapters/sqlserver/core_ext/finder_methods.rb +6 -4
  22. data/lib/active_record/connection_adapters/sqlserver/core_ext/preloader.rb +36 -0
  23. data/lib/active_record/connection_adapters/sqlserver/core_ext/query_methods.rb +4 -1
  24. data/lib/active_record/connection_adapters/sqlserver/database_limits.rb +9 -0
  25. data/lib/active_record/connection_adapters/sqlserver/database_statements.rb +55 -14
  26. data/lib/active_record/connection_adapters/sqlserver/database_tasks.rb +2 -0
  27. data/lib/active_record/connection_adapters/sqlserver/errors.rb +2 -0
  28. data/lib/active_record/connection_adapters/sqlserver/quoting.rb +38 -0
  29. data/lib/active_record/connection_adapters/sqlserver/schema_creation.rb +16 -3
  30. data/lib/active_record/connection_adapters/sqlserver/schema_dumper.rb +2 -0
  31. data/lib/active_record/connection_adapters/sqlserver/schema_statements.rb +93 -70
  32. data/lib/active_record/connection_adapters/sqlserver/showplan.rb +2 -0
  33. data/lib/active_record/connection_adapters/sqlserver/showplan/printer_table.rb +2 -0
  34. data/lib/active_record/connection_adapters/sqlserver/showplan/printer_xml.rb +2 -0
  35. data/lib/active_record/connection_adapters/sqlserver/sql_type_metadata.rb +2 -0
  36. data/lib/active_record/connection_adapters/sqlserver/table_definition.rb +42 -40
  37. data/lib/active_record/connection_adapters/sqlserver/transaction.rb +3 -1
  38. data/lib/active_record/connection_adapters/sqlserver/type.rb +2 -0
  39. data/lib/active_record/connection_adapters/sqlserver/type/big_integer.rb +3 -1
  40. data/lib/active_record/connection_adapters/sqlserver/type/binary.rb +5 -2
  41. data/lib/active_record/connection_adapters/sqlserver/type/boolean.rb +3 -1
  42. data/lib/active_record/connection_adapters/sqlserver/type/char.rb +5 -2
  43. data/lib/active_record/connection_adapters/sqlserver/type/data.rb +2 -0
  44. data/lib/active_record/connection_adapters/sqlserver/type/date.rb +3 -1
  45. data/lib/active_record/connection_adapters/sqlserver/type/datetime.rb +7 -6
  46. data/lib/active_record/connection_adapters/sqlserver/type/datetime2.rb +2 -0
  47. data/lib/active_record/connection_adapters/sqlserver/type/datetimeoffset.rb +2 -0
  48. data/lib/active_record/connection_adapters/sqlserver/type/decimal.rb +5 -2
  49. data/lib/active_record/connection_adapters/sqlserver/type/float.rb +3 -1
  50. data/lib/active_record/connection_adapters/sqlserver/type/integer.rb +3 -1
  51. data/lib/active_record/connection_adapters/sqlserver/type/json.rb +2 -0
  52. data/lib/active_record/connection_adapters/sqlserver/type/money.rb +4 -2
  53. data/lib/active_record/connection_adapters/sqlserver/type/real.rb +3 -1
  54. data/lib/active_record/connection_adapters/sqlserver/type/small_integer.rb +3 -1
  55. data/lib/active_record/connection_adapters/sqlserver/type/small_money.rb +4 -2
  56. data/lib/active_record/connection_adapters/sqlserver/type/smalldatetime.rb +3 -1
  57. data/lib/active_record/connection_adapters/sqlserver/type/string.rb +2 -0
  58. data/lib/active_record/connection_adapters/sqlserver/type/text.rb +3 -1
  59. data/lib/active_record/connection_adapters/sqlserver/type/time.rb +5 -4
  60. data/lib/active_record/connection_adapters/sqlserver/type/time_value_fractional.rb +2 -0
  61. data/lib/active_record/connection_adapters/sqlserver/type/timestamp.rb +3 -1
  62. data/lib/active_record/connection_adapters/sqlserver/type/tiny_integer.rb +3 -1
  63. data/lib/active_record/connection_adapters/sqlserver/type/unicode_char.rb +5 -2
  64. data/lib/active_record/connection_adapters/sqlserver/type/unicode_string.rb +2 -0
  65. data/lib/active_record/connection_adapters/sqlserver/type/unicode_text.rb +3 -1
  66. data/lib/active_record/connection_adapters/sqlserver/type/unicode_varchar.rb +6 -3
  67. data/lib/active_record/connection_adapters/sqlserver/type/unicode_varchar_max.rb +4 -2
  68. data/lib/active_record/connection_adapters/sqlserver/type/uuid.rb +3 -1
  69. data/lib/active_record/connection_adapters/sqlserver/type/varbinary.rb +6 -3
  70. data/lib/active_record/connection_adapters/sqlserver/type/varbinary_max.rb +4 -2
  71. data/lib/active_record/connection_adapters/sqlserver/type/varchar.rb +6 -3
  72. data/lib/active_record/connection_adapters/sqlserver/type/varchar_max.rb +4 -2
  73. data/lib/active_record/connection_adapters/sqlserver/utils.rb +2 -0
  74. data/lib/active_record/connection_adapters/sqlserver/version.rb +2 -0
  75. data/lib/active_record/connection_adapters/sqlserver_adapter.rb +44 -10
  76. data/lib/active_record/connection_adapters/sqlserver_column.rb +9 -3
  77. data/lib/active_record/sqlserver_base.rb +8 -0
  78. data/lib/active_record/tasks/sqlserver_database_tasks.rb +2 -0
  79. data/lib/activerecord-sqlserver-adapter.rb +2 -0
  80. data/lib/arel/visitors/sqlserver.rb +40 -10
  81. data/lib/arel_sqlserver.rb +2 -0
  82. data/test/appveyor/dbsetup.ps1 +4 -4
  83. data/test/cases/adapter_test_sqlserver.rb +65 -1
  84. data/test/cases/change_column_null_test_sqlserver.rb +2 -0
  85. data/test/cases/coerced_tests.rb +644 -187
  86. data/test/cases/column_test_sqlserver.rb +2 -1
  87. data/test/cases/connection_test_sqlserver.rb +2 -0
  88. data/test/cases/execute_procedure_test_sqlserver.rb +2 -0
  89. data/test/cases/fetch_test_sqlserver.rb +2 -0
  90. data/test/cases/fully_qualified_identifier_test_sqlserver.rb +4 -2
  91. data/test/cases/helper_sqlserver.rb +2 -0
  92. data/test/cases/in_clause_test_sqlserver.rb +36 -0
  93. data/test/cases/index_test_sqlserver.rb +2 -0
  94. data/test/cases/json_test_sqlserver.rb +2 -0
  95. data/test/cases/migration_test_sqlserver.rb +4 -2
  96. data/test/cases/order_test_sqlserver.rb +2 -0
  97. data/test/cases/pessimistic_locking_test_sqlserver.rb +2 -0
  98. data/test/cases/rake_test_sqlserver.rb +2 -0
  99. data/test/cases/schema_dumper_test_sqlserver.rb +3 -1
  100. data/test/cases/schema_test_sqlserver.rb +2 -0
  101. data/test/cases/scratchpad_test_sqlserver.rb +2 -0
  102. data/test/cases/showplan_test_sqlserver.rb +4 -2
  103. data/test/cases/specific_schema_test_sqlserver.rb +2 -0
  104. data/test/cases/transaction_test_sqlserver.rb +2 -1
  105. data/test/cases/trigger_test_sqlserver.rb +2 -1
  106. data/test/cases/utils_test_sqlserver.rb +2 -0
  107. data/test/cases/uuid_test_sqlserver.rb +2 -1
  108. data/test/debug.rb +2 -0
  109. data/test/migrations/create_clients_and_change_column_null.rb +2 -0
  110. data/test/migrations/transaction_table/1_table_will_never_be_created.rb +2 -0
  111. data/test/models/sqlserver/booking.rb +2 -0
  112. data/test/models/sqlserver/customers_view.rb +2 -0
  113. data/test/models/sqlserver/datatype.rb +2 -0
  114. data/test/models/sqlserver/datatype_migration.rb +2 -0
  115. data/test/models/sqlserver/dollar_table_name.rb +2 -0
  116. data/test/models/sqlserver/edge_schema.rb +2 -0
  117. data/test/models/sqlserver/fk_has_fk.rb +2 -0
  118. data/test/models/sqlserver/fk_has_pk.rb +2 -0
  119. data/test/models/sqlserver/natural_pk_data.rb +2 -0
  120. data/test/models/sqlserver/natural_pk_int_data.rb +2 -0
  121. data/test/models/sqlserver/no_pk_data.rb +2 -0
  122. data/test/models/sqlserver/object_default.rb +2 -0
  123. data/test/models/sqlserver/quoted_table.rb +2 -0
  124. data/test/models/sqlserver/quoted_view_1.rb +2 -0
  125. data/test/models/sqlserver/quoted_view_2.rb +2 -0
  126. data/test/models/sqlserver/sst_memory.rb +2 -0
  127. data/test/models/sqlserver/string_default.rb +2 -0
  128. data/test/models/sqlserver/string_defaults_big_view.rb +2 -0
  129. data/test/models/sqlserver/string_defaults_view.rb +2 -0
  130. data/test/models/sqlserver/tinyint_pk.rb +2 -0
  131. data/test/models/sqlserver/trigger.rb +2 -0
  132. data/test/models/sqlserver/trigger_history.rb +2 -0
  133. data/test/models/sqlserver/upper.rb +2 -0
  134. data/test/models/sqlserver/uppered.rb +2 -0
  135. data/test/models/sqlserver/uuid.rb +2 -0
  136. data/test/schema/sqlserver_specific_schema.rb +2 -0
  137. data/test/support/coerceable_test_sqlserver.rb +14 -5
  138. data/test/support/connection_reflection.rb +2 -0
  139. data/test/support/core_ext/query_cache.rb +3 -0
  140. data/test/support/load_schema_sqlserver.rb +2 -0
  141. data/test/support/minitest_sqlserver.rb +2 -0
  142. data/test/support/paths_sqlserver.rb +2 -0
  143. data/test/support/rake_helpers.rb +1 -0
  144. data/test/support/sql_counter_sqlserver.rb +3 -0
  145. data/test/support/test_in_memory_oltp.rb +2 -0
  146. metadata +18 -9
@@ -1,4 +1,5 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'cases/helper_sqlserver'
3
4
 
4
5
  class ColumnTestSQLServer < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
  require 'models/reply'
3
5
  require 'models/topic'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class ExecuteProcedureTestSQLServer < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
  require 'models/book'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class FullyQualifiedIdentifierTestSQLServer < ActiveRecord::TestCase
@@ -42,14 +44,14 @@ class FullyQualifiedIdentifierTestSQLServer < ActiveRecord::TestCase
42
44
 
43
45
  it 'should not use fully qualified table name in order clause' do
44
46
  table = Arel::Table.new(:table)
45
- expected_sql = "SELECT * FROM [my.server].[db].[schema].[table] ORDER BY [table].[name]"
47
+ expected_sql = "SELECT * FROM [my.server].[db].[schema].[table] ORDER BY [table].[name]"
46
48
  assert_equal expected_sql, table.project(Arel.star).order(table[:name]).to_sql
47
49
  end
48
50
 
49
51
  it 'should use fully qualified table name in insert statement' do
50
52
  manager = Arel::InsertManager.new
51
53
  manager.into Arel::Table.new(:table)
52
- manager.values = manager.create_values [Arel.sql('*')], %w{ a }
54
+ manager.values = manager.create_values [Arel.sql('*')]
53
55
  expected_sql = "INSERT INTO [my.server].[db].[schema].[table] VALUES (*)"
54
56
  quietly { assert_equal expected_sql, manager.to_sql }
55
57
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'support/paths_sqlserver'
2
4
  require 'bundler/setup'
3
5
  Bundler.require :default, :development
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cases/helper_sqlserver'
4
+ require 'models/post'
5
+ require 'models/author'
6
+
7
+ class InClauseTestSQLServer < ActiveRecord::TestCase
8
+ fixtures :posts, :authors
9
+
10
+ it 'removes ordering from subqueries' do
11
+ authors_subquery = Author.where(name: ['David', 'Mary', 'Bob']).order(:name)
12
+ posts = Post.where(author: authors_subquery)
13
+
14
+ assert_includes authors_subquery.to_sql, "ORDER BY [authors].[name]"
15
+ assert_not_includes posts.to_sql, "ORDER BY [authors].[name]"
16
+ assert_equal 10, posts.length
17
+ end
18
+
19
+ it 'does not remove ordering from subquery that includes a limit' do
20
+ authors_subquery = Author.where(name: ['David', 'Mary', 'Bob']).order(:name).limit(2)
21
+ posts = Post.where(author: authors_subquery)
22
+
23
+ assert_includes authors_subquery.to_sql, "ORDER BY [authors].[name]"
24
+ assert_includes posts.to_sql, "ORDER BY [authors].[name]"
25
+ assert_equal 7, posts.length
26
+ end
27
+
28
+ it 'does not remove ordering from subquery that includes an offset' do
29
+ authors_subquery = Author.where(name: ['David', 'Mary', 'Bob']).order(:name).offset(1)
30
+ posts = Post.where(author: authors_subquery)
31
+
32
+ assert_includes authors_subquery.to_sql, "ORDER BY [authors].[name]"
33
+ assert_includes posts.to_sql, "ORDER BY [authors].[name]"
34
+ assert_equal 8, posts.length
35
+ end
36
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class IndexTestSQLServer < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  if ActiveRecord::Base.connection.supports_json?
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
  require 'models/person'
3
5
 
@@ -20,7 +22,7 @@ class MigrationTestSQLServer < ActiveRecord::TestCase
20
22
  it 'not create a tables if error in migrations' do
21
23
  begin
22
24
  migrations_dir = File.join ARTest::SQLServer.migrations_root, 'transaction_table'
23
- quietly { ActiveRecord::MigrationContext.new(migrations_dir).up }
25
+ quietly { ActiveRecord::MigrationContext.new(migrations_dir, ActiveRecord::SchemaMigration).up }
24
26
  rescue Exception => e
25
27
  assert_match %r|this and all later migrations canceled|, e.message
26
28
  end
@@ -45,7 +47,7 @@ class MigrationTestSQLServer < ActiveRecord::TestCase
45
47
  Person.reset_column_information
46
48
  end
47
49
 
48
- it 'not drop the default contraint if just renaming' do
50
+ it 'not drop the default constraint if just renaming' do
49
51
  find_default = lambda do
50
52
  connection.execute_procedure(:sp_helpconstraint, 'sst_string_defaults', 'nomsg').select do |row|
51
53
  row['constraint_type'] == "DEFAULT on column string_with_pretend_paren_three"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
  require 'models/post'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
  require 'models/person'
3
5
  require 'models/reader'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class SQLServerRakeTest < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class SchemaDumperTestSQLServer < ActiveRecord::TestCase
@@ -168,7 +170,7 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
168
170
  if expected.nil?
169
171
  _(actual).must_be_nil message
170
172
  elsif expected.is_a?(Array)
171
- actual.must_include expected, message
173
+ _(actual).must_include expected, message
172
174
  elsif expected.is_a?(Float)
173
175
  _(actual).must_be_close_to expected, 0.001
174
176
  elsif expected.is_a?(Proc)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class SchemaTestSQLServer < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class ScratchpadTestSQLServer < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
  require 'models/car'
3
5
 
@@ -21,14 +23,14 @@ class ShowplanTestSQLServer < ActiveRecord::TestCase
21
23
 
22
24
  it 'from prepared statement' do
23
25
  plan = Car.where(name: ',').limit(1).explain
24
- _(plan).must_include " SELECT [cars].* FROM [cars] WHERE [cars].[name]"
26
+ _(plan).must_include "SELECT [cars].* FROM [cars] WHERE [cars].[name]"
25
27
  _(plan).must_include "TOP EXPRESSION", 'make sure we do not showplan the sp_executesql'
26
28
  _(plan).must_include "Clustered Index Scan", 'make sure we do not showplan the sp_executesql'
27
29
  end
28
30
 
29
31
  it 'from array condition using index' do
30
32
  plan = Car.where(id: [1, 2]).explain
31
- _(plan).must_include " SELECT [cars].* FROM [cars] WHERE [cars].[id] IN (1, 2)"
33
+ _(plan).must_include "SELECT [cars].* FROM [cars] WHERE [cars].[id] IN (1, 2)"
32
34
  _(plan).must_include "Clustered Index Seek", 'make sure we do not showplan the sp_executesql'
33
35
  end
34
36
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class SpecificSchemaTestSQLServer < ActiveRecord::TestCase
@@ -1,4 +1,5 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'cases/helper_sqlserver'
3
4
  require 'models/ship'
4
5
  require 'models/developer'
@@ -1,4 +1,5 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'cases/helper_sqlserver'
3
4
 
4
5
  class SQLServerTriggerTest < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cases/helper_sqlserver'
2
4
 
3
5
  class UtilsTestSQLServer < ActiveRecord::TestCase
@@ -1,4 +1,5 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'cases/helper_sqlserver'
3
4
 
4
5
  class SQLServerUuidTest < ActiveRecord::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # require 'rails/all'
2
4
  require 'tiny_tds'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CreateClientsAndChangeColumnNull < ActiveRecord::Migration[5.2]
2
4
  def up
3
5
  create_table :clients do |t|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class TableWillNeverBeCreated < ActiveRecord::Migration
2
4
 
3
5
  def self.up
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestBooking < ActiveRecord::Base
2
4
  self.table_name = 'sst_bookings'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestCustomersView < ActiveRecord::Base
2
4
  self.table_name = 'sst_customers_view'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestDatatype < ActiveRecord::Base
2
4
  self.table_name = :sst_datatypes
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestDatatypeMigration < ActiveRecord::Base
2
4
  self.table_name = :sst_datatypes_migration
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestDollarTableName < ActiveRecord::Base
2
4
  self.table_name = 'sst_my$strange_table'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestEdgeSchema < ActiveRecord::Base
2
4
 
3
5
  self.table_name = 'sst_edge_schemas'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestHasFk < ActiveRecord::Base
2
4
  self.table_name = 'sst_has_fks'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestHasPk < ActiveRecord::Base
2
4
  self.table_name = 'sst_has_pks'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestNaturalPkData < ActiveRecord::Base
2
4
  self.table_name = 'sst_natural_pk_data'
3
5
  self.primary_key = 'legacy_id'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestNaturalPkIntData < ActiveRecord::Base
2
4
  self.table_name = 'sst_natural_pk_int_data'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestNoPkData < ActiveRecord::Base
2
4
  self.table_name = 'sst_no_pk_data'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestObjectDefault < ActiveRecord::Base
2
4
  self.table_name = 'sst_defaultobjects'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestQuotedTable < ActiveRecord::Base
2
4
  self.table_name = '[sst_quoted-table]'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestQuotedView1 < ActiveRecord::Base
2
4
  self.table_name = 'sst_quoted-view1'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestQuotedView2 < ActiveRecord::Base
2
4
  self.table_name = 'sst_quoted-view2'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTMemory < ActiveRecord::Base
2
4
  self.table_name = 'sst_memory'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestStringDefault < ActiveRecord::Base
2
4
  self.table_name = 'sst_string_defaults'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestStringDefaultsBigView < ActiveRecord::Base
2
4
  self.table_name = 'sst_string_defaults_big_view'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestStringDefaultsView < ActiveRecord::Base
2
4
  self.table_name = 'sst_string_defaults_view'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestTinyintPk < ActiveRecord::Base
2
4
  self.table_name = 'sst_tinyint_pk'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestTrigger < ActiveRecord::Base
2
4
  self.table_name = 'sst_table_with_trigger'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestTriggerHistory < ActiveRecord::Base
2
4
  self.table_name = 'sst_table_with_trigger_history'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestUpper < ActiveRecord::Base
2
4
  self.table_name = 'sst_upper_tests'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestUppered < ActiveRecord::Base
2
4
  self.table_name = 'SST_UPPER_TESTS'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SSTestUuid < ActiveRecord::Base
2
4
  self.table_name = 'sst_uuids'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ActiveRecord::Schema.define do
2
4
 
3
5
  # Exhaustive Data Types