activerecord-sqlserver-adapter 6.0.0.rc1 → 6.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +29 -0
  4. data/CHANGELOG.md +20 -0
  5. data/Gemfile +11 -5
  6. data/Guardfile +9 -8
  7. data/Rakefile +12 -16
  8. data/VERSION +1 -1
  9. data/activerecord-sqlserver-adapter.gemspec +3 -3
  10. data/lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb +0 -4
  11. data/lib/active_record/connection_adapters/sqlserver/core_ext/attribute_methods.rb +1 -4
  12. data/lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb +3 -4
  13. data/lib/active_record/connection_adapters/sqlserver/core_ext/explain.rb +1 -3
  14. data/lib/active_record/connection_adapters/sqlserver/core_ext/finder_methods.rb +2 -3
  15. data/lib/active_record/connection_adapters/sqlserver/core_ext/query_methods.rb +2 -3
  16. data/lib/active_record/connection_adapters/sqlserver/database_statements.rb +35 -32
  17. data/lib/active_record/connection_adapters/sqlserver/database_tasks.rb +7 -12
  18. data/lib/active_record/connection_adapters/sqlserver/errors.rb +0 -3
  19. data/lib/active_record/connection_adapters/sqlserver/quoting.rb +8 -8
  20. data/lib/active_record/connection_adapters/sqlserver/schema_creation.rb +0 -2
  21. data/lib/active_record/connection_adapters/sqlserver/schema_dumper.rb +7 -7
  22. data/lib/active_record/connection_adapters/sqlserver/schema_statements.rb +106 -103
  23. data/lib/active_record/connection_adapters/sqlserver/showplan.rb +6 -8
  24. data/lib/active_record/connection_adapters/sqlserver/showplan/printer_table.rb +2 -2
  25. data/lib/active_record/connection_adapters/sqlserver/showplan/printer_xml.rb +1 -1
  26. data/lib/active_record/connection_adapters/sqlserver/sql_type_metadata.rb +0 -2
  27. data/lib/active_record/connection_adapters/sqlserver/table_definition.rb +1 -4
  28. data/lib/active_record/connection_adapters/sqlserver/transaction.rb +4 -8
  29. data/lib/active_record/connection_adapters/sqlserver/type.rb +35 -35
  30. data/lib/active_record/connection_adapters/sqlserver/type/big_integer.rb +0 -2
  31. data/lib/active_record/connection_adapters/sqlserver/type/binary.rb +0 -2
  32. data/lib/active_record/connection_adapters/sqlserver/type/boolean.rb +0 -2
  33. data/lib/active_record/connection_adapters/sqlserver/type/char.rb +2 -2
  34. data/lib/active_record/connection_adapters/sqlserver/type/data.rb +0 -2
  35. data/lib/active_record/connection_adapters/sqlserver/type/date.rb +2 -3
  36. data/lib/active_record/connection_adapters/sqlserver/type/datetime.rb +2 -3
  37. data/lib/active_record/connection_adapters/sqlserver/type/datetime2.rb +0 -2
  38. data/lib/active_record/connection_adapters/sqlserver/type/datetimeoffset.rb +0 -2
  39. data/lib/active_record/connection_adapters/sqlserver/type/decimal.rb +0 -2
  40. data/lib/active_record/connection_adapters/sqlserver/type/float.rb +0 -2
  41. data/lib/active_record/connection_adapters/sqlserver/type/integer.rb +0 -2
  42. data/lib/active_record/connection_adapters/sqlserver/type/json.rb +0 -1
  43. data/lib/active_record/connection_adapters/sqlserver/type/money.rb +0 -2
  44. data/lib/active_record/connection_adapters/sqlserver/type/real.rb +0 -2
  45. data/lib/active_record/connection_adapters/sqlserver/type/small_integer.rb +0 -2
  46. data/lib/active_record/connection_adapters/sqlserver/type/small_money.rb +0 -2
  47. data/lib/active_record/connection_adapters/sqlserver/type/smalldatetime.rb +0 -2
  48. data/lib/active_record/connection_adapters/sqlserver/type/string.rb +0 -2
  49. data/lib/active_record/connection_adapters/sqlserver/type/text.rb +0 -2
  50. data/lib/active_record/connection_adapters/sqlserver/type/time.rb +2 -3
  51. data/lib/active_record/connection_adapters/sqlserver/type/time_value_fractional.rb +6 -9
  52. data/lib/active_record/connection_adapters/sqlserver/type/timestamp.rb +0 -2
  53. data/lib/active_record/connection_adapters/sqlserver/type/tiny_integer.rb +0 -2
  54. data/lib/active_record/connection_adapters/sqlserver/type/unicode_char.rb +1 -3
  55. data/lib/active_record/connection_adapters/sqlserver/type/unicode_string.rb +0 -2
  56. data/lib/active_record/connection_adapters/sqlserver/type/unicode_text.rb +0 -2
  57. data/lib/active_record/connection_adapters/sqlserver/type/unicode_varchar.rb +0 -2
  58. data/lib/active_record/connection_adapters/sqlserver/type/unicode_varchar_max.rb +0 -2
  59. data/lib/active_record/connection_adapters/sqlserver/type/uuid.rb +1 -2
  60. data/lib/active_record/connection_adapters/sqlserver/type/varbinary.rb +1 -3
  61. data/lib/active_record/connection_adapters/sqlserver/type/varbinary_max.rb +0 -2
  62. data/lib/active_record/connection_adapters/sqlserver/type/varchar.rb +1 -3
  63. data/lib/active_record/connection_adapters/sqlserver/type/varchar_max.rb +0 -2
  64. data/lib/active_record/connection_adapters/sqlserver/utils.rb +8 -11
  65. data/lib/active_record/connection_adapters/sqlserver/version.rb +0 -2
  66. data/lib/active_record/connection_adapters/sqlserver_adapter.rb +85 -83
  67. data/lib/active_record/connection_adapters/sqlserver_column.rb +0 -2
  68. data/lib/active_record/sqlserver_base.rb +1 -1
  69. data/lib/active_record/tasks/sqlserver_database_tasks.rb +26 -32
  70. data/lib/activerecord-sqlserver-adapter.rb +1 -1
  71. data/lib/arel/visitors/sqlserver.rb +18 -14
  72. data/lib/arel_sqlserver.rb +2 -2
  73. data/test/cases/adapter_test_sqlserver.rb +161 -182
  74. data/test/cases/change_column_null_test_sqlserver.rb +12 -12
  75. data/test/cases/coerced_tests.rb +88 -270
  76. data/test/cases/column_test_sqlserver.rb +281 -283
  77. data/test/cases/connection_test_sqlserver.rb +15 -20
  78. data/test/cases/execute_procedure_test_sqlserver.rb +18 -20
  79. data/test/cases/fetch_test_sqlserver.rb +14 -22
  80. data/test/cases/fully_qualified_identifier_test_sqlserver.rb +12 -18
  81. data/test/cases/helper_sqlserver.rb +13 -15
  82. data/test/cases/in_clause_test_sqlserver.rb +9 -9
  83. data/test/cases/index_test_sqlserver.rb +13 -15
  84. data/test/cases/json_test_sqlserver.rb +23 -25
  85. data/test/cases/migration_test_sqlserver.rb +22 -28
  86. data/test/cases/order_test_sqlserver.rb +51 -54
  87. data/test/cases/pessimistic_locking_test_sqlserver.rb +25 -33
  88. data/test/cases/rake_test_sqlserver.rb +31 -45
  89. data/test/cases/schema_dumper_test_sqlserver.rb +104 -108
  90. data/test/cases/schema_test_sqlserver.rb +18 -26
  91. data/test/cases/scratchpad_test_sqlserver.rb +2 -4
  92. data/test/cases/showplan_test_sqlserver.rb +24 -33
  93. data/test/cases/specific_schema_test_sqlserver.rb +66 -65
  94. data/test/cases/transaction_test_sqlserver.rb +16 -19
  95. data/test/cases/trigger_test_sqlserver.rb +12 -12
  96. data/test/cases/utils_test_sqlserver.rb +68 -70
  97. data/test/cases/uuid_test_sqlserver.rb +11 -13
  98. data/test/debug.rb +6 -6
  99. data/test/migrations/create_clients_and_change_column_null.rb +1 -1
  100. data/test/migrations/transaction_table/1_table_will_never_be_created.rb +2 -4
  101. data/test/models/sqlserver/booking.rb +1 -1
  102. data/test/models/sqlserver/customers_view.rb +1 -1
  103. data/test/models/sqlserver/dollar_table_name.rb +1 -1
  104. data/test/models/sqlserver/edge_schema.rb +1 -3
  105. data/test/models/sqlserver/fk_has_fk.rb +1 -1
  106. data/test/models/sqlserver/fk_has_pk.rb +1 -1
  107. data/test/models/sqlserver/natural_pk_data.rb +2 -2
  108. data/test/models/sqlserver/natural_pk_int_data.rb +1 -1
  109. data/test/models/sqlserver/no_pk_data.rb +1 -1
  110. data/test/models/sqlserver/object_default.rb +1 -1
  111. data/test/models/sqlserver/quoted_table.rb +2 -2
  112. data/test/models/sqlserver/quoted_view_1.rb +1 -1
  113. data/test/models/sqlserver/quoted_view_2.rb +1 -1
  114. data/test/models/sqlserver/sst_memory.rb +1 -1
  115. data/test/models/sqlserver/string_default.rb +1 -1
  116. data/test/models/sqlserver/string_defaults_big_view.rb +1 -1
  117. data/test/models/sqlserver/string_defaults_view.rb +1 -1
  118. data/test/models/sqlserver/tinyint_pk.rb +1 -1
  119. data/test/models/sqlserver/trigger.rb +2 -2
  120. data/test/models/sqlserver/trigger_history.rb +1 -1
  121. data/test/models/sqlserver/upper.rb +1 -1
  122. data/test/models/sqlserver/uppered.rb +1 -1
  123. data/test/models/sqlserver/uuid.rb +1 -1
  124. data/test/schema/sqlserver_specific_schema.rb +20 -22
  125. data/test/support/coerceable_test_sqlserver.rb +1 -4
  126. data/test/support/connection_reflection.rb +1 -2
  127. data/test/support/core_ext/query_cache.rb +1 -1
  128. data/test/support/load_schema_sqlserver.rb +3 -5
  129. data/test/support/minitest_sqlserver.rb +1 -1
  130. data/test/support/paths_sqlserver.rb +9 -11
  131. data/test/support/rake_helpers.rb +12 -10
  132. data/test/support/sql_counter_sqlserver.rb +0 -4
  133. data/test/support/test_in_memory_oltp.rb +7 -7
  134. metadata +5 -4
@@ -1,16 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if ENV['IN_MEMORY_OLTP']
4
- require 'config'
5
- require 'active_record'
6
- require 'support/config'
7
- require 'support/connection'
3
+ if ENV["IN_MEMORY_OLTP"]
4
+ require "config"
5
+ require "active_record"
6
+ require "support/config"
7
+ require "support/connection"
8
8
 
9
9
  ARTest.connect
10
10
 
11
11
  if ActiveRecord::Base.connection.supports_in_memory_oltp?
12
- puts 'Configuring In-Memory OLTP...'
13
- inmem_file = ARTest::SQLServer.test_root_sqlserver, 'schema', 'enable-in-memory-oltp.sql'
12
+ puts "Configuring In-Memory OLTP..."
13
+ inmem_file = ARTest::SQLServer.test_root_sqlserver, "schema", "enable-in-memory-oltp.sql"
14
14
  inmem_sql = File.read File.join(inmem_file)
15
15
  ActiveRecord::Base.connection.execute(inmem_sql)
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-sqlserver-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.rc1
4
+ version: 6.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2020-05-15 00:00:00.000000000 Z
17
+ date: 2020-05-19 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activerecord
@@ -55,6 +55,7 @@ files:
55
55
  - ".editorconfig"
56
56
  - ".github/issue_template.md"
57
57
  - ".gitignore"
58
+ - ".rubocop.yml"
58
59
  - ".travis.yml"
59
60
  - CHANGELOG.md
60
61
  - CODE_OF_CONDUCT.md
@@ -213,8 +214,8 @@ licenses:
213
214
  - MIT
214
215
  metadata:
215
216
  bug_tracker_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues
216
- changelog_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v6.0.0.rc1/CHANGELOG.md
217
- source_code_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/tree/v6.0.0.rc1
217
+ changelog_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v6.0.0.rc2/CHANGELOG.md
218
+ source_code_uri: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/tree/v6.0.0.rc2
218
219
  post_install_message:
219
220
  rdoc_options: []
220
221
  require_paths: