2 class MssqlField
implements Field
{
3 private $name, $tableName, $default, $max_length, $nullable, $type;
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'];
18 function tableName() {
19 return $this->tableName
;
22 function defaultValue() {
23 return $this->default;
26 function maxLength() {
27 return $this->max_length
;
30 function isNullable() {
31 return $this->nullable
;