Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / includes / libs / rdbms / field / MssqlField.php
1 <?php
2 class MssqlField implements Field {
3 private $name, $tableName, $default, $max_length, $nullable, $type;
4
5 function __construct( $info ) {
6 $this->name = $info['COLUMN_NAME'];
7 $this->tableName = $info['TABLE_NAME'];
8 $this->default = $info['COLUMN_DEFAULT'];
9 $this->max_length = $info['CHARACTER_MAXIMUM_LENGTH'];
10 $this->nullable = !( strtolower( $info['IS_NULLABLE'] ) == 'no' );
11 $this->type = $info['DATA_TYPE'];
12 }
13
14 function name() {
15 return $this->name;
16 }
17
18 function tableName() {
19 return $this->tableName;
20 }
21
22 function defaultValue() {
23 return $this->default;
24 }
25
26 function maxLength() {
27 return $this->max_length;
28 }
29
30 function isNullable() {
31 return $this->nullable;
32 }
33
34 function type() {
35 return $this->type;
36 }
37 }
38