
Public Member Functions | ||||
| getSize () | ||||
| setSize ($size) | ||||
| ||||
| hasSize () | ||||
| getPrecision () | ||||
| setPrecision ($precision) | ||||
| ||||
| hasPrecision () | ||||
| getScale () | ||||
| setScale ($scale) | ||||
| ||||
| setTimezoned ($zoned=false) | ||||
| ||||
| isTimezoned () | ||||
| setNull ($isNull=false) | ||||
| ||||
| isNull () | ||||
| setUnsigned ($unsigned=false) | ||||
| ||||
| isUnsigned () | ||||
| typeToString (Dialect $dialect) | ||||
| toDialectString (Dialect $dialect) | ||||
Static Public Member Functions | ||||
| static | create ($id) | |||
| ||||
| static | getAnyId () | |||
| must return any existent ID 1 should be ok for most enumerations | ||||
Public Attributes | ||||
| const | SMALLINT = 0x001001 | |||
| const | INTEGER = 0x001002 | |||
| const | BIGINT = 0x001003 | |||
| const | NUMERIC = 0x001704 | |||
| const | REAL = 0x001005 | |||
| const | DOUBLE = 0x001006 | |||
| const | BOOLEAN = 0x000007 | |||
| const | CHAR = 0x000108 | |||
| const | VARCHAR = 0x000109 | |||
| const | TEXT = 0x00000A | |||
| const | DATE = 0x00000B | |||
| const | TIME = 0x000A0C | |||
| const | TIMESTAMP = 0x000A0D | |||
| const | HAVE_SIZE = 0x000100 | |||
| const | HAVE_PRECISION = 0x000200 | |||
| const | HAVE_SCALE = 0x000400 | |||
| const | HAVE_TIMEZONE = 0x000800 | |||
| const | CAN_BE_UNSIGNED = 0x001000 | |||
Protected Attributes | ||||
| $names | ||||
Private Attributes | ||||
| $size = null | ||||
| $precision = null | ||||
| $scale = null | ||||
| $null = true | ||||
| $timezone = false | ||||
| $unsigned = false | ||||
Definition at line 18 of file DataType.class.php.
| static DataType::create | ( | $ | id | ) | [static] |
Definition at line 75 of file DataType.class.php.
References IdentifiableObject::$id.
Referenced by PgSQL::getTableInfo(), TimeType::toColumnType(), TimestampType::toColumnType(), StringType::toColumnType(), SmallIntegerType::toColumnType(), NumericType::toColumnType(), IntegerType::toColumnType(), FloatType::toColumnType(), FixedLengthStringType::toColumnType(), DoubleType::toColumnType(), DateType::toColumnType(), BooleanType::toColumnType(), and BigIntegerType::toColumnType().
| static DataType::getAnyId | ( | ) | [static] |
must return any existent ID 1 should be ok for most enumerations
Reimplemented from Enumeration.
Definition at line 80 of file DataType.class.php.
| DataType::getSize | ( | ) |
Definition at line 85 of file DataType.class.php.
| DataType::setSize | ( | $ | size | ) |
| WrongArgumentException |
Definition at line 94 of file DataType.class.php.
References $size, hasSize(), and Assert::isTrue().

| DataType::hasSize | ( | ) |
| DataType::getPrecision | ( | ) |
Definition at line 109 of file DataType.class.php.
| DataType::setPrecision | ( | $ | precision | ) |
| WrongArgumentException |
Definition at line 118 of file DataType.class.php.
References $precision, and Assert::isTrue().

| DataType::hasPrecision | ( | ) |
Definition at line 128 of file DataType.class.php.
| DataType::getScale | ( | ) |
Definition at line 133 of file DataType.class.php.
| DataType::setScale | ( | $ | scale | ) |
| WrongArgumentException |
Definition at line 142 of file DataType.class.php.
References $scale, and Assert::isTrue().

| DataType::setTimezoned | ( | $ | zoned = false |
) |
| WrongArgumentException |
Definition at line 156 of file DataType.class.php.
References Assert::isTrue().

| DataType::isTimezoned | ( | ) |
Definition at line 165 of file DataType.class.php.
| DataType::setNull | ( | $ | isNull = false |
) |
| DataType::isNull | ( | ) |
Definition at line 180 of file DataType.class.php.
| DataType::setUnsigned | ( | $ | unsigned = false |
) |
| WrongArgumentException |
Definition at line 189 of file DataType.class.php.
References $unsigned, and Assert::isTrue().

| DataType::isUnsigned | ( | ) |
Definition at line 198 of file DataType.class.php.
| DataType::typeToString | ( | Dialect $ | dialect | ) |
| DataType::toDialectString | ( | Dialect $ | dialect | ) |
Implements DialectString.
Definition at line 215 of file DataType.class.php.
References $out, hasSize(), Dialect::timeZone(), and typeToString().

| const DataType::SMALLINT = 0x001001 |
Definition at line 20 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and SmallIntegerType::toColumnType().
| const DataType::INTEGER = 0x001002 |
Definition at line 21 of file DataType.class.php.
Referenced by LiteDialect::checkColumn(), PgSQL::getTableInfo(), and IntegerType::toColumnType().
| const DataType::BIGINT = 0x001003 |
Definition at line 22 of file DataType.class.php.
Referenced by LiteDialect::checkColumn(), PgSQL::getTableInfo(), and BigIntegerType::toColumnType().
| const DataType::NUMERIC = 0x001704 |
Definition at line 23 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and NumericType::toColumnType().
| const DataType::REAL = 0x001005 |
Definition at line 25 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and FloatType::toColumnType().
| const DataType::DOUBLE = 0x001006 |
Definition at line 26 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and DoubleType::toColumnType().
| const DataType::BOOLEAN = 0x000007 |
Definition at line 28 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), BooleanType::toColumnType(), and DBColumn::toDialectString().
| const DataType::CHAR = 0x000108 |
Definition at line 30 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and FixedLengthStringType::toColumnType().
| const DataType::VARCHAR = 0x000109 |
Definition at line 31 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and StringType::toColumnType().
| const DataType::TEXT = 0x00000A |
Definition at line 32 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and StringType::toColumnType().
| const DataType::DATE = 0x00000B |
Definition at line 34 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and DateType::toColumnType().
| const DataType::TIME = 0x000A0C |
Definition at line 35 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and TimeType::toColumnType().
| const DataType::TIMESTAMP = 0x000A0D |
Definition at line 36 of file DataType.class.php.
Referenced by PgSQL::getTableInfo(), and TimestampType::toColumnType().
| const DataType::HAVE_SIZE = 0x000100 |
Definition at line 38 of file DataType.class.php.
| const DataType::HAVE_PRECISION = 0x000200 |
Definition at line 39 of file DataType.class.php.
| const DataType::HAVE_SCALE = 0x000400 |
Definition at line 40 of file DataType.class.php.
| const DataType::HAVE_TIMEZONE = 0x000800 |
Definition at line 41 of file DataType.class.php.
| const DataType::CAN_BE_UNSIGNED = 0x001000 |
Definition at line 42 of file DataType.class.php.
DataType::$size = null [private] |
DataType::$precision = null [private] |
DataType::$scale = null [private] |
DataType::$null = true [private] |
Definition at line 48 of file DataType.class.php.
DataType::$timezone = false [private] |
Definition at line 49 of file DataType.class.php.
DataType::$unsigned = false [private] |
DataType::$names [protected] |
Initial value:
array(
self::SMALLINT => 'SMALLINT',
self::INTEGER => 'INTEGER',
self::BIGINT => 'BIGINT',
self::NUMERIC => 'NUMERIC',
self::REAL => 'REAL',
self::DOUBLE => 'DOUBLE PRECISION',
self::BOOLEAN => 'BOOLEAN',
self::CHAR => 'CHARACTER',
self::VARCHAR => 'CHARACTER VARYING',
self::TEXT => 'TEXT',
self::DATE => 'DATE',
self::TIME => 'TIME',
self::TIMESTAMP => 'TIMESTAMP'
)
Reimplemented from Enumeration.
Definition at line 52 of file DataType.class.php.
1.5.4