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
Methods inherited from String
Instance Method Details
#quoted(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 26 def quoted(value) return value.quoted_id if value.respond_to?(:quoted_id) Utils.quote_string_single(value) end |
#serialize(value) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 12 def serialize(value) return if value.nil? return value if value.is_a?(Data) Data.new super, self end |
#sqlserver_type ⇒ Object
19 20 21 22 23 24 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 19 def sqlserver_type "char".yield_self do |type| type += "(#{limit})" if limit type end end |
#type ⇒ Object
8 9 10 |
# File 'lib/active_record/connection_adapters/sqlserver/type/char.rb', line 8 def type :char end |