Merge "Added a separate error message for mkdir failures"
[lhc/web/wiklou.git] / includes / libs / rdbms / field / MssqlField.php
1 <?php
2
3 namespace Wikimedia\Rdbms;
4
5 class MssqlField implements Field {
6 private $name, $tableName, $default, $max_length, $nullable, $type;
7
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'];
15 }
16
17 function name() {
18 return $this->name;
19 }
20
21 function tableName() {
22 return $this->tableName;
23 }
24
25 function defaultValue() {
26 return $this->default;
27 }
28
29 function maxLength() {
30 return $this->max_length;
31 }
32
33 function isNullable() {
34 return $this->nullable;
35 }
36
37 function type() {
38 return $this->type;
39 }
40 }