Skip to content

Commit ac64683

Browse files
committed
Better abstract SET defaults.
1 parent 116be8a commit ac64683

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,17 +368,15 @@ def dblib_connect(config)
368368
).tap do |client|
369369
if config[:azure]
370370
client.execute('SET ANSI_NULLS ON').do
371-
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
372371
client.execute('SET ANSI_NULL_DFLT_ON ON').do
373-
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
374372
client.execute('SET ANSI_PADDING ON').do
375-
client.execute('SET QUOTED_IDENTIFIER ON').do
376373
client.execute('SET ANSI_WARNINGS ON').do
377374
else
378375
client.execute('SET ANSI_DEFAULTS ON').do
379-
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
380-
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
381376
end
377+
client.execute('SET QUOTED_IDENTIFIER ON').do
378+
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do
379+
client.execute('SET IMPLICIT_TRANSACTIONS OFF').do
382380
client.execute('SET TEXTSIZE 2147483647').do
383381
client.execute('SET CONCAT_NULL_YIELDS_NULL ON').do
384382
end

0 commit comments

Comments
 (0)