class Innodb::DataType::CharacterType

Fixed-length character type.

Attributes

name[R]
width[R]

Public Class Methods

new(base_type, modifiers, properties) click to toggle source
# File lib/innodb/data_type.rb, line 191
def initialize(base_type, modifiers, properties)
  @width = modifiers.fetch(0, 1)
  @name = Innodb::DataType.make_name(base_type, modifiers, properties)
end

Public Instance Methods

value(data) click to toggle source
# File lib/innodb/data_type.rb, line 196
def value(data)
  # The SQL standard defines that CHAR fields should have end-spaces
  # stripped off.
  data.sub(/ +$/, "")
end