3 namespace Wikimedia\Rdbms;
5 class MssqlField implements Field {
6 private $name, $tableName, $default, $max_length, $nullable, $type;
8 function __construct( $info ) {
9 $this->name = $info['COLUMN_NAME'];
10 $this->tableName = $info['TABLE_NAME'];
11 $this->default = $info['COLUMN_DEFAULT'];
12 $this->max_length = $info['CHARACTER_MAXIMUM_LENGTH'];
13 $this->nullable = !( strtolower( $info['IS_NULLABLE'] ) == 'no' );
14 $this->type = $info['DATA_TYPE'];
21 function tableName() {
22 return $this->tableName;
25 function defaultValue() {
26 return $this->default;
29 function maxLength() {
30 return $this->max_length;
33 function isNullable() {
34 return $this->nullable;