Class: ActiveRecord::ConnectionAdapters::SQLServer::Type::Char
- Inherits:
-
String
- Object
- Type::String
- String
- ActiveRecord::ConnectionAdapters::SQLServer::Type::Char
- Defined in:
- lib/active_record/connection_adapters/sqlserver/type/char.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#quoted(value) ⇒ Object
23 24 25 26 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 23 def quoted(value) return value.quoted_id if value.respond_to?(:quoted_id) Utils.quote_string_single(value) end |
#serialize(value) ⇒ Object
11 12 13 14 15 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 11 def serialize(value) return if value.nil? return value if value.is_a?(Data) Data.new super, self end |
#sqlserver_type ⇒ Object
17 18 19 20 21 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 17 def sqlserver_type 'char'.tap do |type| type << "(#{limit})" if limit end end |
#type ⇒ Object
7 8 9 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 7 def type :char end |