Methods
B
N
S
Attributes
[R] identity
Class Public methods
binary_to_string(value)
# File rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 112
def self.binary_to_string(value)
  # FIXME: sybase-ctlib uses separate sql method for binary columns.
  value
end
new(name, default, sql_type = nil, nullable = nil, identity = nil, primary = nil)
# File rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 89
def initialize(name, default, sql_type = nil, nullable = nil, identity = nil, primary = nil)
  super(name, default, sql_type, nullable)
  @default, @identity, @primary = type_cast(default), identity, primary
end
string_to_binary(value)
# File rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 108
def self.string_to_binary(value)
  "0x#{value.unpack("H*")[0]}"
end
Instance Public methods
simplified_type(field_type)
# File rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb, line 94
def simplified_type(field_type)
  case field_type
    when %rint|bigint|smallint|tinyint/        then :integer
    when %rfloat|double|real/                  then :float
    when %rdecimal|money|numeric|smallmoney/   then :decimal
    when %rtext|ntext/                         then :text
    when %rbinary|image|varbinary/             then :binary
    when %rchar|nchar|nvarchar|string|varchar/ then :string
    when %rbit/                                then :boolean
    when %rdatetime|smalldatetime/             then :datetime
    else                                       super
  end
end