Methods
Attributes
| [R] | identity |
Public Class methods
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 112
112: def self.binary_to_string(value)
113: # FIXME: sybase-ctlib uses separate sql method for binary columns.
114: value
115: end
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 89
89: def initialize(name, default, sql_type = nil, nullable = nil, identity = nil, primary = nil)
90: super(name, default, sql_type, nullable)
91: @default, @identity, @primary = type_cast(default), identity, primary
92: end
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 108
108: def self.string_to_binary(value)
109: "0x#{value.unpack("H*")[0]}"
110: end
Public Instance methods
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 94
94: def simplified_type(field_type)
95: case field_type
96: when /int|bigint|smallint|tinyint/i then :integer
97: when /float|double|real/i then :float
98: when /decimal|money|numeric|smallmoney/i then :decimal
99: when /text|ntext/i then :text
100: when /binary|image|varbinary/i then :binary
101: when /char|nchar|nvarchar|string|varchar/i then :string
102: when /bit/i then :boolean
103: when /datetime|smalldatetime/i then :datetime
104: else super
105: end
106: end