public function getExtrasDDLWithDelimiter()
    {
        $ddls = $this->getExtrasDDL();
        $start = "DELIMITER {$this->delimiter}";
        $end = 'DELIMITER ;';

        $newDdls = [];

        foreach ($ddls as $idx => $ddl) {
            $newDdls[] = $start;
            if (!preg_match('/;$/', $ddl)) {
                $newDdls[] = $ddl . ' ' . $this->delimiter;
            } else {
                $newDdls[] = preg_replace('/;$/', $this->delimiter, $ddl);
            }
            $newDdls[] = $end;
        }

        return implode(PHP_EOL, $newDdls) . PHP_EOL . $end . PHP_EOL;
    }
public function getExtrasDDLWithDelimiter()
    {
        $ddls = $this->getExtrasDDL();
        $start = "DELIMITER {$this->delimiter}";
        $end = 'DELIMITER ;';

        $newDdls = [];

        foreach ($ddls as $idx => $ddl) {
            $newDdls[] = $start;
            if (!preg_match('/;$/', $ddl)) {
                $newDdls[] = $ddl . ' ' . $this->delimiter;
            } else {
                $newDdls[] = preg_replace('/;$/', $this->delimiter, $ddl);
            }
            $newDdls[] = $end;
        }

        return implode(PHP_EOL, $newDdls) . PHP_EOL . $end . PHP_EOL;
    }
public function getExtrasDDLWithDelimiter ( ) { $ ddls = $ this -> getExtrasDDL ( ) ; $ start = "DELIMITER {$this->delimiter}" ; $ end = 'DELIMITER ;' ; $ newDdls = [ ] ; foreach ( $ ddls as $ idx => $ ddl ) { $ newDdls [ ] = $ start ; if ( ! preg_match ( '/;$/' , $ ddl ) ) { $ newDdls [ ] = $ ddl . ' ' . $ this -> delimiter ; } else { $ newDdls [ ] = preg_replace ( '/;$/' , $ this -> delimiter , $ ddl ) ; } $ newDdls [ ] = $ end ; } return implode ( PHP_EOL , $ newDdls ) . PHP_EOL . $ end . PHP_EOL ; }
Special case for Mysql when delaing with delimiters.
Special case for Mysql when delaing with delimiters .