MediaWiki REL1_30
MssqlField.php
Go to the documentation of this file.
1<?php
2
3namespace Wikimedia\Rdbms;
4
5class MssqlField implements Field {
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}
tableName()
Name of table this field belongs to.
isNullable()
Whether this field can store NULL values.
Base for all database-specific classes representing information about database fields.
Definition Field.php:9