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. |
|
setPhpName(string $phpName)
Set the php name of this column. |
||
string |
getPhpName()
Get the name of a column. |
|
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 |
isNumeric()
Whether this column is numeric (int, decimal, bigint etc). |
|
boolean |
isText()
Whether this column is a text column (varchar, char, longvarchar). |
|
setSize(int $size)
Set the size of this column. |
||
int |
getSize()
Get the size of this column. |
|
setPrimaryKey(boolean $pk)
Set if this column is a primary key or not. |
||
boolean |
isPrimaryKey()
Is this column a primary key? |
|
setNotNull(Boolean $nn)
Set if this column may be null. |
||
boolean |
isNotNull()
Is null value allowed ? |
|
setDefaultValue(mixed $defaultValue)
Sets the default value for this column. |
||
mixed |
getDefaultValue()
Gets the default value for this column. |
|
setForeignKey(string $tableName, string $columnName)
Set the foreign key for this column. |
||
boolean |
isForeignKey()
Is this column a foreign key? |
|
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. |
|
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) | ||
ignoreCase(string $str, AdapterInterface $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? |
Details
at line 106
public
__construct(string $name, TableMap $containingTable)
Constructor.
at line 117
public string
getName()
Get the name of a column.
at line 127
public TableMap
getTable()
Get the table map this column belongs to.
at line 137
public string
getTableName()
Get the name of the table this column is in.
at line 147
public string
getFullyQualifiedName()
Get the table name + column name.
at line 157
public
setPhpName(string $phpName)
Set the php name of this column.
at line 167
public string
getPhpName()
Get the name of a column.
at line 177
public
setType(string $type)
Set the Propel type of this column.
at line 187
public string
getType()
Get the Propel type of this column.
at line 197
public int
getPdoType()
Get the PDO type of this column.
at line 207
public boolean
isLob()
Whether this is a BLOB, LONGVARBINARY, or VARBINARY.
at line 221
public boolean
isTemporal()
Whether this is a DATE/TIME/TIMESTAMP column.
at line 237
public boolean
isNumeric()
Whether this column is numeric (int, decimal, bigint etc).
at line 257
public boolean
isText()
Whether this column is a text column (varchar, char, longvarchar).
at line 271
public
setSize(int $size)
Set the size of this column.
at line 281
public int
getSize()
Get the size of this column.
at line 291
public
setPrimaryKey(boolean $pk)
Set if this column is a primary key or not.
at line 301
public boolean
isPrimaryKey()
Is this column a primary key?
at line 311
public
setNotNull(Boolean $nn)
Set if this column may be null.
at line 321
public boolean
isNotNull()
Is null value allowed ?
at line 331
public
setDefaultValue(mixed $defaultValue)
Sets the default value for this column.
at line 340
public mixed
getDefaultValue()
Gets the default value for this column.
at line 351
public
setForeignKey(string $tableName, string $columnName)
Set the foreign key for this column.
at line 368
public boolean
isForeignKey()
Is this column a foreign key?
at line 376
public
getRelation()
Get the RelationMap object for this foreign key
at line 397
public string
getRelatedName()
Get the table.column that this column is related to.
at line 407
public string
getRelatedTableName()
Get the table name that this column is related to.
at line 417
public string
getRelatedColumnName()
Get the column name that this column is related to.
at line 428
public TableMap
getRelatedTable()
Get the TableMap object that this column is related to.
at line 443
public ColumnMap
getRelatedColumn()
Get the TableMap object that this column is related to.
at line 453
public
setValueSet(array $values)
Set the valueSet of this column (only valid for ENUM columns).
at line 463
public array
getValueSet()
Get the valueSet of this column (only valid for ENUM columns).
at line 468
public
isInValueSet($value)
at line 473
public
getValueSetKey($value)
at line 484
public
ignoreCase(string $str, AdapterInterface $db)
Performs DB-specific ignore case, but only if the column type necessitates it.
at line 501
static public string
normalizeName(string $name)
Normalizes the column name, removing table prefix and uppercasing.
article.first_name becomes FIRST_NAME
at line 515
public
setPrimaryString(boolean $pkString)
Set this column to be a primaryString column.
at line 525
public boolean
isPrimaryString()
Is this column a primaryString column?