silverstripe-framework/ORM/FieldType/DBDouble.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

23 lines
554 B
PHP

<?php
namespace SilverStripe\ORM\FieldType;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\Connect\MySQLDatabase;
/**
* Supports double precision DB types
*/
class DBDouble extends DBFloat {
public function requireField() {
// HACK: MSSQL does not support double so we're using float instead
// @todo This should go into MSSQLDatabase ideally somehow
if(DB::get_conn() instanceof MySQLDatabase) {
DB::require_field($this->tableName, $this->name, "double");
} else {
DB::require_field($this->tableName, $this->name, "float");
}
}
}