2008-04-05 01:00:37 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2014-08-15 08:53:05 +02:00
|
|
|
*
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2009-03-22 23:59:14 +01:00
|
|
|
* @subpackage model
|
2008-04-05 01:00:37 +02:00
|
|
|
*/
|
2013-04-17 07:35:59 +02:00
|
|
|
class Double extends Float {
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2012-09-19 12:07:39 +02:00
|
|
|
public function requireField() {
|
2013-04-17 07:35:59 +02:00
|
|
|
// HACK: MSSQL does not support double so we're using float instead
|
2009-11-05 22:44:40 +01:00
|
|
|
// @todo This should go into MSSQLDatabase ideally somehow
|
2013-06-21 00:32:08 +02:00
|
|
|
if(DB::get_conn() instanceof MySQLDatabase) {
|
|
|
|
DB::require_field($this->tableName, $this->name, "double");
|
2010-04-13 04:27:46 +02:00
|
|
|
} else {
|
2013-06-21 00:32:08 +02:00
|
|
|
DB::require_field($this->tableName, $this->name, "float");
|
2009-11-05 22:44:40 +01:00
|
|
|
}
|
2008-04-05 01:00:37 +02:00
|
|
|
}
|
2012-03-24 04:04:52 +01:00
|
|
|
}
|