From 93c87b46714d5e1d611e4cedd27dde5a6c924cca Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 7 Apr 2010 02:46:28 +0000 Subject: [PATCH] BUGFIX Added missing dbDataType method to MSSQLDatabase --- code/MSSQLDatabase.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index ee742cb..92a6ba8 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -1046,6 +1046,20 @@ class MSSQLDatabase extends SS_Database { return 'RAND()'; } + /** + * This is a lookup table for data types. + * + * For instance, MSSQL uses 'BIGINT', while MySQL uses 'UNSIGNED' + * and PostgreSQL uses 'INT'. + */ + function dbDataType($type){ + $values = array( + 'unsigned integer'=>'BIGINT' + ); + if(isset($values[$type])) return $values[$type]; + else return ''; + } + /** * Convert a SQLQuery object into a SQL statement. */