Skip to content

Commit 29b6cc7

Browse files
committed
Indendt more for UUID prep.
1 parent 25ac832 commit 29b6cc7

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -192,51 +192,51 @@ def cs_equality_operator
192192
def initialize_type_map(m)
193193
m.register_type %r{.*}, SQLServer::Type::UnicodeString.new
194194
# Exact Numerics
195-
register_class_with_limit m, 'bigint(8)', SQLServer::Type::BigInteger
196-
m.alias_type 'bigint', 'bigint(8)'
197-
register_class_with_limit m, 'int(4)', SQLServer::Type::Integer
198-
m.alias_type 'integer', 'int(4)'
199-
m.alias_type 'int', 'int(4)'
200-
register_class_with_limit m, 'smallint(2)', SQLServer::Type::SmallInteger
201-
m.alias_type 'smallint', 'smallint(2)'
202-
register_class_with_limit m, 'tinyint(1)', SQLServer::Type::TinyInteger
203-
m.alias_type 'tinyint', 'tinyint(1)'
204-
m.register_type 'bit', SQLServer::Type::Boolean.new
195+
register_class_with_limit m, 'bigint(8)', SQLServer::Type::BigInteger
196+
m.alias_type 'bigint', 'bigint(8)'
197+
register_class_with_limit m, 'int(4)', SQLServer::Type::Integer
198+
m.alias_type 'integer', 'int(4)'
199+
m.alias_type 'int', 'int(4)'
200+
register_class_with_limit m, 'smallint(2)', SQLServer::Type::SmallInteger
201+
m.alias_type 'smallint', 'smallint(2)'
202+
register_class_with_limit m, 'tinyint(1)', SQLServer::Type::TinyInteger
203+
m.alias_type 'tinyint', 'tinyint(1)'
204+
m.register_type 'bit', SQLServer::Type::Boolean.new
205205
m.register_type %r{\Adecimal}i do |sql_type|
206206
scale = extract_scale(sql_type)
207207
precision = extract_precision(sql_type)
208208
SQLServer::Type::Decimal.new precision: precision, scale: scale
209209
end
210-
m.alias_type %r{\Anumeric}i, 'decimal'
211-
m.register_type 'money', SQLServer::Type::Money.new
212-
m.register_type 'smallmoney', SQLServer::Type::SmallMoney.new
210+
m.alias_type %r{\Anumeric}i, 'decimal'
211+
m.register_type 'money', SQLServer::Type::Money.new
212+
m.register_type 'smallmoney', SQLServer::Type::SmallMoney.new
213213
# Approximate Numerics
214-
m.register_type 'float', SQLServer::Type::Float.new
215-
m.register_type 'real', SQLServer::Type::Real.new
214+
m.register_type 'float', SQLServer::Type::Float.new
215+
m.register_type 'real', SQLServer::Type::Real.new
216216
# Date and Time
217-
m.register_type 'date', SQLServer::Type::Date.new
218-
m.register_type 'datetime', SQLServer::Type::DateTime.new
219-
m.register_type 'smalldatetime', SQLServer::Type::SmallDateTime.new
217+
m.register_type 'date', SQLServer::Type::Date.new
218+
m.register_type 'datetime', SQLServer::Type::DateTime.new
219+
m.register_type 'smalldatetime', SQLServer::Type::SmallDateTime.new
220220
m.register_type %r{\Atime}i do |sql_type|
221221
scale = extract_scale(sql_type)
222222
precision = extract_precision(sql_type)
223223
SQLServer::Type::Time.new precision: precision
224224
end
225225
# Character Strings
226-
register_class_with_limit m, %r{\Achar}i, SQLServer::Type::Char
227-
register_class_with_limit m, %r{\Avarchar}i, SQLServer::Type::Varchar
228-
m.register_type 'varchar(max)', SQLServer::Type::VarcharMax.new
229-
m.register_type 'text', SQLServer::Type::Text.new
226+
register_class_with_limit m, %r{\Achar}i, SQLServer::Type::Char
227+
register_class_with_limit m, %r{\Avarchar}i, SQLServer::Type::Varchar
228+
m.register_type 'varchar(max)', SQLServer::Type::VarcharMax.new
229+
m.register_type 'text', SQLServer::Type::Text.new
230230
# Unicode Character Strings
231-
register_class_with_limit m, %r{\Anchar}i, SQLServer::Type::UnicodeChar
232-
register_class_with_limit m, %r{\Anvarchar}i, SQLServer::Type::UnicodeVarchar
233-
m.alias_type 'string', 'nvarchar(4000)'
234-
m.register_type 'nvarchar(max)', SQLServer::Type::UnicodeVarcharMax.new
235-
m.register_type 'ntext', SQLServer::Type::UnicodeText.new
231+
register_class_with_limit m, %r{\Anchar}i, SQLServer::Type::UnicodeChar
232+
register_class_with_limit m, %r{\Anvarchar}i, SQLServer::Type::UnicodeVarchar
233+
m.alias_type 'string', 'nvarchar(4000)'
234+
m.register_type 'nvarchar(max)', SQLServer::Type::UnicodeVarcharMax.new
235+
m.register_type 'ntext', SQLServer::Type::UnicodeText.new
236236
# Binary Strings
237-
register_class_with_limit m, %r{\Abinary}i, SQLServer::Type::Binary
238-
register_class_with_limit m, %r{\Avarbinary}i, SQLServer::Type::Varbinary
239-
m.register_type 'varbinary(max)', SQLServer::Type::VarbinaryMax.new
237+
register_class_with_limit m, %r{\Abinary}i, SQLServer::Type::Binary
238+
register_class_with_limit m, %r{\Avarbinary}i, SQLServer::Type::Varbinary
239+
m.register_type 'varbinary(max)', SQLServer::Type::VarbinaryMax.new
240240
end
241241

242242
def translate_exception(e, message)

0 commit comments

Comments
 (0)