2014-07-14 11:06:47 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a signed 8 byte integer field. Do note PHP running as 32-bit might not work with Bigint properly, as it
|
|
|
|
* would convert the value to a float when queried from the database since the value is a 64-bit one.
|
|
|
|
*
|
|
|
|
* @package framework
|
|
|
|
* @subpackage model
|
|
|
|
* @see Int
|
|
|
|
*/
|
2017-04-03 22:05:25 +02:00
|
|
|
class BigInt extends DBInt {
|
2014-07-14 11:06:47 +02:00
|
|
|
|
|
|
|
public function requireField() {
|
|
|
|
$parts = array(
|
|
|
|
'datatype' => 'bigint',
|
|
|
|
'precision' => 8,
|
|
|
|
'null' => 'not null',
|
|
|
|
'default' => $this->defaultVal,
|
|
|
|
'arrayValue' => $this->arrayValue
|
|
|
|
);
|
|
|
|
|
|
|
|
$values = array('type' => 'bigint', 'parts' => $parts);
|
|
|
|
DB::require_field($this->tableName, $this->name, $values);
|
|
|
|
}
|
|
|
|
}
|