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 10
10
- [ #1196 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1196 ) Use default inspect for database adapter
11
11
- [ #1216 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1216 ) Refactor adapter interface to match abstract adapter
12
12
- [ #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
13
14
14
15
#### Fixed
15
16
Original file line number Diff line number Diff line change @@ -101,15 +101,14 @@ end
101
101
#### Configure Connection
102
102
103
103
The 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
105
105
example we are setting the ` TEXTSIZE ` to 64 megabytes.
106
106
107
107
``` ruby
108
108
module ActiveRecord
109
109
module ConnectionAdapters
110
110
class SQLServerAdapter < AbstractAdapter
111
- def configure_connection
112
- super
111
+ def additional_connection_configuration
113
112
@raw_connection .execute(" SET TEXTSIZE #{ 64 .megabytes} " ).do
114
113
end
115
114
end
Original file line number Diff line number Diff line change @@ -521,6 +521,12 @@ def configure_connection
521
521
522
522
initialize_dateformatter
523
523
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
524
530
end
525
531
end
526
532
end
You can’t perform that action at this time.
0 commit comments