MediaWiki REL1_30
ORAField.php
Go to the documentation of this file.
1<?php
2
4
5class ORAField implements Field {
8
9 function __construct( $info ) {
10 $this->name = $info['column_name'];
11 $this->tablename = $info['table_name'];
12 $this->default = $info['data_default'];
13 $this->max_length = $info['data_length'];
14 $this->nullable = $info['not_null'];
15 $this->is_pk = isset( $info['prim'] ) && $info['prim'] == 1 ? 1 : 0;
16 $this->is_unique = isset( $info['uniq'] ) && $info['uniq'] == 1 ? 1 : 0;
17 $this->is_multiple = isset( $info['nonuniq'] ) && $info['nonuniq'] == 1 ? 1 : 0;
18 $this->is_key = ( $this->is_pk || $this->is_unique || $this->is_multiple );
19 $this->type = $info['data_type'];
20 }
21
22 function name() {
23 return $this->name;
24 }
25
26 function tableName() {
27 return $this->tablename;
28 }
29
30 function defaultValue() {
31 return $this->default;
32 }
33
34 function maxLength() {
35 return $this->max_length;
36 }
37
38 function isNullable() {
39 return $this->nullable;
40 }
41
42 function isKey() {
43 return $this->is_key;
44 }
45
46 function isMultipleKey() {
47 return $this->is_multiple;
48 }
49
50 function type() {
51 return $this->type;
52 }
53}
tableName()
Name of table this field belongs to.
Definition ORAField.php:26
isMultipleKey()
Definition ORAField.php:46
name()
Field name.
Definition ORAField.php:22
defaultValue()
Definition ORAField.php:30
__construct( $info)
Definition ORAField.php:9
type()
Database type.
Definition ORAField.php:50
maxLength()
Definition ORAField.php:34
isNullable()
Whether this field can store NULL values.
Definition ORAField.php:38
Base for all database-specific classes representing information about database fields.
Definition Field.php:9