summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php')
-rw-r--r--framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php b/framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php
index d6ea8ca7..59a2d43e 100644
--- a/framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php
+++ b/framework/Data/ActiveRecord/Vendor/TPgsqlColumnMetaData.php
@@ -57,6 +57,21 @@ class TPgsqlColumnMetaData extends TComponent
return $this->_name;
}
+ public function getPHPType()
+ {
+ switch(strtolower($this->_type))
+ {
+ case 'bit': case 'bit varying': case 'real': case 'serial':
+ return 'integer';
+ case 'boolean':
+ return 'boolean';
+ case 'bigint': case 'bigserial': case 'double precision': case 'money': case 'numeric':
+ return 'float';
+ default:
+ return 'string';
+ }
+ }
+
/**
* @return boolean true if column is a sequence, false otherwise.
*/