Class: Innodb::DataType
- Inherits:
-
Object
- Object
- Innodb::DataType
- Defined in:
- lib/innodb/data_type.rb
Defined Under Namespace
Classes: BinaryType, BitType, BlobType, CharacterType, DateType, DatetimeType, DecimalType, DoubleType, FloatType, IntegerType, RollPointerType, TimeType, TimestampType, TransactionIdType, VariableBinaryType, VariableCharacterType, YearType
Constant Summary collapse
- TYPES =
Maps base type to data type class.
{ :BIT => BitType, :BOOL => IntegerType, :BOOLEAN => IntegerType, :TINYINT => IntegerType, :SMALLINT => IntegerType, :MEDIUMINT => IntegerType, :INT => IntegerType, :INT6 => IntegerType, :BIGINT => IntegerType, :FLOAT => FloatType, :DOUBLE => DoubleType, :DECIMAL => DecimalType, :NUMERIC => DecimalType, :CHAR => CharacterType, :VARCHAR => VariableCharacterType, :BINARY => BinaryType, :VARBINARY => VariableBinaryType, :TINYBLOB => BlobType, :BLOB => BlobType, :MEDIUMBLOB => BlobType, :LONGBLOB => BlobType, :TINYTEXT => BlobType, :TEXT => BlobType, :MEDIUMTEXT => BlobType, :LONGTEXT => BlobType, :YEAR => YearType, :TIME => TimeType, :DATE => DateType, :DATETIME => DatetimeType, :TIMESTAMP => TimestampType, :TRX_ID => TransactionIdType, :ROLL_PTR => RollPointerType, }
Class Method Summary collapse
- .make_name(base_type, modifiers, properties) ⇒ Object
- .new(base_type, modifiers, properties) ⇒ Object
Class Method Details
.make_name(base_type, modifiers, properties) ⇒ Object
403 404 405 406 407 408 409 |
# File 'lib/innodb/data_type.rb', line 403 def self.make_name(base_type, modifiers, properties) name = base_type.to_s name << '(' + modifiers.join(',') + ')' if not modifiers.empty? name << " " name << properties.join(' ') name.strip end |