public function getMapTypeDeclarationSQL(array $field, array $options)
    {
        $type = array_key_exists('type', $options) ? $options['type'] : MapType::DYNAMIC;

        $fields = array_key_exists('fields', $options) ? $options['fields'] : array();
        $columns = array();
        foreach ($fields as $field) {
            $columns[$field->getQuotedName($this)] = $this->prepareColumnData($field);
        }
        $objectFields = $this->getColumnDeclarationListSQL($columns);

        $declaration = count($columns) > 0 ? ' AS ( ' . $objectFields . ' )' : '';
        return 'OBJECT ( ' . $type . ' )' . $declaration ;
    }
public function getMapTypeDeclarationSQL(array $field, array $options)
    {
        $type = array_key_exists('type', $options) ? $options['type'] : MapType::DYNAMIC;

        $fields = array_key_exists('fields', $options) ? $options['fields'] : array();
        $columns = array();
        foreach ($fields as $field) {
            $columns[$field->getQuotedName($this)] = $this->prepareColumnData($field);
        }
        $objectFields = $this->getColumnDeclarationListSQL($columns);

        $declaration = count($columns) > 0 ? ' AS ( ' . $objectFields . ' )' : '';
        return 'OBJECT ( ' . $type . ' )' . $declaration ;
    }
public function getMapTypeDeclarationSQL ( array $ field , array $ options ) { $ type = array_key_exists ( 'type' , $ options ) ? $ options [ 'type' ] : MapType :: DYNAMIC ; $ fields = array_key_exists ( 'fields' , $ options ) ? $ options [ 'fields' ] : array ( ) ; $ columns = array ( ) ; foreach ( $ fields as $ field ) { $ columns [ $ field -> getQuotedName ( $ this ) ] = $ this -> prepareColumnData ( $ field ) ; } $ objectFields = $ this -> getColumnDeclarationListSQL ( $ columns ) ; $ declaration = count ( $ columns ) > 0 ? ' AS ( ' . $ objectFields . ' )' : '' ; return 'OBJECT ( ' . $ type . ' )' . $ declaration ; }
Gets the SQL snippet used to declare an OBJECT column type.

@param array $field

@return string
Gets the SQL snippet used to declare an OBJECT column type .