mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
API CHANGE: dbDataType function created
This commit is contained in:
parent
17c8ea054d
commit
0094e39a9e
@ -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
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user