Skip to content

Commit 25ac832

Browse files
committed
Indent a bit and prepare for UUID type.
1 parent 3baaffe commit 25ac832

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -208,35 +208,35 @@ def initialize_type_map(m)
208208
SQLServer::Type::Decimal.new precision: precision, scale: scale
209209
end
210210
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
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)