public static function parseArray(array $data)
    {
        $type = strtoupper($data['data_type']);
        if (!defined(static::class . '::' . $type))
            throw new InvalidValueException("Invalid column type: $type");
            
        return array(
            'name' => $data['column_name'],
            'type' => $type,
            'max_length' => $data['character_maximum_length'] ?? null,
            'is_nullable' => isset($data['is_nullable']) ? $data['is_nullable'] == true : false,
            'column_default' => $data['column_default'] ?? null,
            'numeric_precision' => $data['numeric_precision'] ?? null,
            'numeric_scale' => $data['numeric_scale'] ?? null,
            'serial' => isset($data['serial']) ? $data['serial'] == true : false,
            'enum_values' => $data['enum_values'] ?? null
        );
    }
public static function parseArray(array $data)
    {
        $type = strtoupper($data['data_type']);
        if (!defined(static::class . '::' . $type))
            throw new InvalidValueException("Invalid column type: $type");
            
        return array(
            'name' => $data['column_name'],
            'type' => $type,
            'max_length' => $data['character_maximum_length'] ?? null,
            'is_nullable' => isset($data['is_nullable']) ? $data['is_nullable'] == true : false,
            'column_default' => $data['column_default'] ?? null,
            'numeric_precision' => $data['numeric_precision'] ?? null,
            'numeric_scale' => $data['numeric_scale'] ?? null,
            'serial' => isset($data['serial']) ? $data['serial'] == true : false,
            'enum_values' => $data['enum_values'] ?? null
        );
    }
public static function parseArray ( array $ data ) { $ type = strtoupper ( $ data [ 'data_type' ] ) ; if ( ! defined ( static :: class . '::' . $ type ) ) throw new InvalidValueException ( "Invalid column type: $type" ) ; return array ( 'name' => $ data [ 'column_name' ] , 'type' => $ type , 'max_length' => $ data [ 'character_maximum_length' ] ?? null , 'is_nullable' => isset ( $ data [ 'is_nullable' ] ) ? $ data [ 'is_nullable' ] == true : false , 'column_default' => $ data [ 'column_default' ] ?? null , 'numeric_precision' => $ data [ 'numeric_precision' ] ?? null , 'numeric_scale' => $ data [ 'numeric_scale' ] ?? null , 'serial' => isset ( $ data [ 'serial' ] ) ? $ data [ 'serial' ] == true : false , 'enum_values' => $ data [ 'enum_values' ] ?? null ) ; }
Parse deserialized array into valid arguments for column properties.
@param array $data The unserialized array
@param array A normalized array containing all fields
Parse deserialized array into valid arguments for column properties .