class ColumnMap
ColumnMap is used to model a column of a table in a database.
GENERAL NOTE
The propel.map classes are abstract building-block classes for modeling the database at runtime. These classes are similar (a lite version) to the propel.engine.database.model classes, which are build-time modeling classes. These classes in themselves do not do any database metadata lookups.
Methods
__construct(string $name, TableMap $containingTable)
Constructor. |
||
string |
getName()
Get the name of a column. |
|
TableMap |
getTable()
Get the table map this column belongs to. |
|
string |
getTableName()
Get the name of the table this column is in. |
|
string |
getFullyQualifiedName()
Get the table name + column name. |
|
void |
setPhpName(string $phpName)
Set the php name of this column. |
|
string |
getPhpName()
Get the name of a column. |
|
void |
setType(string $type)
Set the Propel type of this column. |
|
string |
getType()
Get the Propel type of this column. |
|
int |
getPdoType()
Get the PDO type of this column. |
|
boolean |
isLob()
Whether this is a BLOB, LONGVARBINARY, or VARBINARY. |
|
boolean |
isTemporal()
Whether this is a DATE/TIME/TIMESTAMP column. |
|
boolean |
isEpochTemporal()
Whether this is a DATE/TIME/TIMESTAMP column that is post-epoch (1970). |
|
boolean |
isNumeric()
Whether this column is numeric (int, decimal, bigint etc). |
|
boolean |
isInteger()
Whether this column is an integer |
|
boolean |
isText()
Whether this column is a text column (varchar, char, longvarchar). |
|
void |
setSize(int $size)
Set the size of this column. |
|
int |
getSize()
Get the size of this column. |
|
void |
setPrimaryKey(boolean $pk)
Set if this column is a primary key or not. |
|
boolean |
isPrimaryKey()
Is this column a primary key? |
|
void |
setNotNull(boolean $nn)
Set if this column may be null. |
|
boolean |
isNotNull()
Is null value allowed ? |
|
void |
setDefaultValue(mixed $defaultValue)
Sets the default value for this column. |
|
mixed |
getDefaultValue()
Gets the default value for this column. |
|
void |
setForeignKey(string $tableName, string $columnName)
Set the foreign key for this column. |
|
boolean |
isForeignKey()
Is this column a foreign key? |
|
RelationMap|null |
getRelation()
Get the RelationMap object for this foreign key |
|
string |
getRelatedName()
Get the table.column that this column is related to. |
|
string |
getRelatedTableName()
Get the table name that this column is related to. |
|
string |
getRelatedColumnName()
Get the column name that this column is related to. |
|
TableMap |
getRelatedTable()
Get the TableMap object that this column is related to. |
|
ColumnMap |
getRelatedColumn()
Get the TableMap object that this column is related to. |
|
addValidator($validator)
|
||
hasValidators()
|
||
getValidators()
|
||
setValueSet(array $values)
Set the valueSet of this column (only valid for ENUM columns). |
||
array |
getValueSet()
Get the valueSet of this column (only valid for ENUM columns). |
|
isInValueSet($value)
|
||
getValueSetKey($value)
|
||
string |
ignoreCase(string $str, DBAdapter $db)
Performs DB-specific ignore case, but only if the column type necessitates it. |
|
static string |
normalizeName(string $name)
Normalizes the column name, removing table prefix and uppercasing. |
|
setPrimaryString(boolean $pkString)
Set this column to be a primaryString column. |
||
boolean |
isPrimaryString()
Is this column a primaryString column? |
|
string |
getColumnName()
Gets column name |
Details
at line 74
public
__construct(string $name, TableMap $containingTable)
Constructor.
at line 85
public string
getName()
Get the name of a column.
at line 95
public TableMap
getTable()
Get the table map this column belongs to.
at line 105
public string
getTableName()
Get the name of the table this column is in.
at line 115
public string
getFullyQualifiedName()
Get the table name + column name.
at line 127
public void
setPhpName(string $phpName)
Set the php name of this column.
at line 137
public string
getPhpName()
Get the name of a column.
at line 149
public void
setType(string $type)
Set the Propel type of this column.
at line 159
public string
getType()
Get the Propel type of this column.
at line 169
public int
getPdoType()
Get the PDO type of this column.
at line 179
public boolean
isLob()
Whether this is a BLOB, LONGVARBINARY, or VARBINARY.
at line 190
public boolean
isTemporal()
Whether this is a DATE/TIME/TIMESTAMP column.
at line 204
public boolean
isEpochTemporal()
Whether this is a DATE/TIME/TIMESTAMP column that is post-epoch (1970).
PHP cannot handle pre-epoch timestamps well -- hence the need to differentiate between epoch and pre-epoch timestamps.
at line 214
public boolean
isNumeric()
Whether this column is numeric (int, decimal, bigint etc).
at line 224
public boolean
isInteger()
Whether this column is an integer
at line 234
public boolean
isText()
Whether this column is a text column (varchar, char, longvarchar).
at line 246
public void
setSize(int $size)
Set the size of this column.
at line 256
public int
getSize()
Get the size of this column.
at line 268
public void
setPrimaryKey(boolean $pk)
Set if this column is a primary key or not.
at line 278
public boolean
isPrimaryKey()
Is this column a primary key?
at line 290
public void
setNotNull(boolean $nn)
Set if this column may be null.
at line 300
public boolean
isNotNull()
Is null value allowed ?
at line 312
public void
setDefaultValue(mixed $defaultValue)
Sets the default value for this column.
at line 322
public mixed
getDefaultValue()
Gets the default value for this column.
at line 335
public void
setForeignKey(string $tableName, string $columnName)
Set the foreign key for this column.
at line 351
public boolean
isForeignKey()
Is this column a foreign key?
at line 365
public RelationMap|null
getRelation()
Get the RelationMap object for this foreign key
at line 384
public string
getRelatedName()
Get the table.column that this column is related to.
at line 394
public string
getRelatedTableName()
Get the table name that this column is related to.
at line 404
public string
getRelatedColumnName()
Get the column name that this column is related to.
at line 415
public TableMap
getRelatedTable()
Get the TableMap object that this column is related to.
at line 430
public ColumnMap
getRelatedColumn()
Get the TableMap object that this column is related to.
at line 435
public
addValidator($validator)
at line 440
public
hasValidators()
at line 445
public
getValidators()
at line 455
public
setValueSet(array $values)
Set the valueSet of this column (only valid for ENUM columns).
at line 465
public array
getValueSet()
Get the valueSet of this column (only valid for ENUM columns).
at line 470
public
isInValueSet($value)
at line 475
public
getValueSetKey($value)
at line 488
public string
ignoreCase(string $str, DBAdapter $db)
Performs DB-specific ignore case, but only if the column type necessitates it.
at line 506
static public string
normalizeName(string $name)
Normalizes the column name, removing table prefix and uppercasing.
article.firstname becomes firstname
at line 520
public
setPrimaryString(boolean $pkString)
Set this column to be a primaryString column.
at line 530
public boolean
isPrimaryString()
Is this column a primaryString column?
at line 544
public string
getColumnName()
Gets column name