API CHANGE: dbDataType function created

This commit is contained in:
Geoff Munn 2010-03-08 21:57:47 +00:00
parent 17c8ea054d
commit 0094e39a9e

View File

@ -821,6 +821,21 @@ class SQLite3Database extends SS_Database {
return 'random()'; return 'random()';
} }
/*
* This is a lookup table for data types.
* For instance, Postgres uses 'INT', while MySQL uses 'UNSIGNED'
* So this is a DB-specific list of equivalents.
*/
function dbDataType($type){
$values=Array(
'unsigned integer'=>'INT'
);
if(isset($values[$type]))
return $values[$type];
else return '';
}
/* /*
* This will return text which has been escaped in a database-friendly manner * This will return text which has been escaped in a database-friendly manner
*/ */