Special case opus mime detction
[mediawiki.git] / includes / libs / rdbms / field / ORAField.php
blobe48310ddc3e4e8c468c36570c1fa3a2b6da55f50
1 <?php
2 class ORAField implements Field {
3 private $name, $tablename, $default, $max_length, $nullable,
4 $is_pk, $is_unique, $is_multiple, $is_key, $type;
6 function __construct( $info ) {
7 $this->name = $info['column_name'];
8 $this->tablename = $info['table_name'];
9 $this->default = $info['data_default'];
10 $this->max_length = $info['data_length'];
11 $this->nullable = $info['not_null'];
12 $this->is_pk = isset( $info['prim'] ) && $info['prim'] == 1 ? 1 : 0;
13 $this->is_unique = isset( $info['uniq'] ) && $info['uniq'] == 1 ? 1 : 0;
14 $this->is_multiple = isset( $info['nonuniq'] ) && $info['nonuniq'] == 1 ? 1 : 0;
15 $this->is_key = ( $this->is_pk || $this->is_unique || $this->is_multiple );
16 $this->type = $info['data_type'];
19 function name() {
20 return $this->name;
23 function tableName() {
24 return $this->tablename;
27 function defaultValue() {
28 return $this->default;
31 function maxLength() {
32 return $this->max_length;
35 function isNullable() {
36 return $this->nullable;
39 function isKey() {
40 return $this->is_key;
43 function isMultipleKey() {
44 return $this->is_multiple;
47 function type() {
48 return $this->type;