Class: ActiveRecord::ConnectionAdapters::MSSQL::Type::UUID
- Inherits:
-
Type::String
- Object
- Type::String
- ActiveRecord::ConnectionAdapters::MSSQL::Type::UUID
- Defined in:
- lib/arjdbc/mssql/types.rb
Constant Summary collapse
- ACCEPTABLE_UUID =
%r{\A\{?([a-fA-F0-9]{4}-?){8}\}?\z}x
Instance Method Summary collapse
Instance Method Details
#type ⇒ Object
21 22 23 |
# File 'lib/arjdbc/mssql/types.rb', line 21 def type :uuid end |
#type_cast(value) ⇒ Object
25 26 27 |
# File 'lib/arjdbc/mssql/types.rb', line 25 def type_cast(value) value.to_s[ACCEPTABLE_UUID, 0] end |