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, }.freeze
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
438 439 440 441 442 443 444 |
# File 'lib/innodb/data_type.rb', line 438 def self.make_name(base_type, modifiers, properties) name = base_type.to_s.dup name << "(#{modifiers.join(',')})" unless modifiers.empty? name << " " name << properties.join(" ") name.strip end |