This commit is contained in:
Paula Quispe
2019-04-24 09:43:53 -04:00
parent 34723302ca
commit 701b59e8e5
3 changed files with 92 additions and 13 deletions

View File

@@ -1006,4 +1006,24 @@ class PmTable
}
return $oCriteria;
}
/**
* Get the type of the column ex: string, int, double, boolean
*
* @param string $pmTablePeer
* @param string $tableName
* @param string $columnName
*
* @return string
*/
public static function getTypeOfColumn($pmTablePeer, $tableName, $columnName)
{
try {
$type = $pmTablePeer::getMapBuilder()->getDatabaseMap()->getTable($tableName)->getColumn($columnName)->getCreoleType();
} catch (Exception $e) {
return '';
}
return $type;
}
}