File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1010- [ #1196 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1196 ) Use default inspect for database adapter
1111- [ #1216 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1216 ) Refactor adapter interface to match abstract adapter
1212- [ #1225 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1225 ) Drop support to Ruby 3.1
13+ - [ #1242 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1242 ) Changed how additional connection configuration is performed
1314
1415#### Fixed
1516
Original file line number Diff line number Diff line change @@ -101,15 +101,14 @@ end
101101#### Configure Connection
102102
103103The adapter conforms to the AbstractAdapter interface to configure connections. If you require additional connection
104- configuration then implement the ` configure_connection ` method in an initializer like so. In the following
104+ configuration then implement the ` additional_connection_configuration ` method in an initializer like so. In the following
105105example we are setting the ` TEXTSIZE ` to 64 megabytes.
106106
107107``` ruby
108108module ActiveRecord
109109 module ConnectionAdapters
110110 class SQLServerAdapter < AbstractAdapter
111- def configure_connection
112- super
111+ def additional_connection_configuration
113112 @raw_connection .execute(" SET TEXTSIZE #{ 64 .megabytes} " ).do
114113 end
115114 end
Original file line number Diff line number Diff line change @@ -521,6 +521,12 @@ def configure_connection
521521
522522 initialize_dateformatter
523523 use_database
524+ additional_connection_configuration
525+ end
526+
527+ # Allow for additional connection configuration by overriding this method.
528+ def additional_connection_configuration
529+ # no-op
524530 end
525531 end
526532 end
You can’t perform that action at this time.
0 commit comments