MediaWiki
REL1_30
MssqlField.php
Go to the documentation of this file.
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
}
Wikimedia\Rdbms\MssqlField
Definition
MssqlField.php:5
Wikimedia\Rdbms\MssqlField\$tableName
$tableName
Definition
MssqlField.php:6
Wikimedia\Rdbms\MssqlField\tableName
tableName()
Name of table this field belongs to.
Definition
MssqlField.php:21
Wikimedia\Rdbms\MssqlField\type
type()
Database type.
Definition
MssqlField.php:37
Wikimedia\Rdbms\MssqlField\defaultValue
defaultValue()
Definition
MssqlField.php:25
Wikimedia\Rdbms\MssqlField\isNullable
isNullable()
Whether this field can store NULL values.
Definition
MssqlField.php:33
Wikimedia\Rdbms\MssqlField\name
name()
Field name.
Definition
MssqlField.php:17
Wikimedia\Rdbms\MssqlField\maxLength
maxLength()
Definition
MssqlField.php:29
Wikimedia\Rdbms\MssqlField\$type
$type
Definition
MssqlField.php:6
Wikimedia\Rdbms\MssqlField\$default
$default
Definition
MssqlField.php:6
Wikimedia\Rdbms\MssqlField\__construct
__construct( $info)
Definition
MssqlField.php:8
Wikimedia\Rdbms\MssqlField\$nullable
$nullable
Definition
MssqlField.php:6
Wikimedia\Rdbms\MssqlField\$max_length
$max_length
Definition
MssqlField.php:6
Wikimedia\Rdbms\MssqlField\$name
$name
Definition
MssqlField.php:6
Wikimedia\Rdbms\Field
Base for all database-specific classes representing information about database fields.
Definition
Field.php:9
Wikimedia\Rdbms
Definition
ChronologyProtector.php:24
includes
libs
rdbms
field
MssqlField.php
Generated on Mon Nov 25 2024 15:42:31 for MediaWiki by
1.10.0