Skip to content

Commit

Permalink
function to know if a column is an integer or not
Browse files Browse the repository at this point in the history
y
  • Loading branch information
Felix Labrecque committed Nov 29, 2012
1 parent 0dededa commit 5869220
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/lib/map/ColumnMap.php
Expand Up @@ -211,6 +211,16 @@ public function isNumeric()
return ($this->type == PropelColumnTypes::NUMERIC || $this->type == PropelColumnTypes::DECIMAL || $this->type == PropelColumnTypes::TINYINT || $this->type == PropelColumnTypes::SMALLINT || $this->type == PropelColumnTypes::INTEGER || $this->type == PropelColumnTypes::BIGINT || $this->type == PropelColumnTypes::REAL || $this->type == PropelColumnTypes::FLOAT || $this->type == PropelColumnTypes::DOUBLE);
}

/**
* Whether this column is an integer
*
* @return boolean
*/
public function isInteger()
{
return $this->type === PDO::PARAM_INT;
}

/**
* Whether this column is a text column (varchar, char, longvarchar).
* @return boolean
Expand Down

0 comments on commit 5869220

Please sign in to comment.