Skip to content

Incorrect formatting of DELIMITER. #104

Description

@vitalyspirin
  1. Space is removed between DELIMITER and semicolon.

If I execute

\SqlFormatter::format('DELIMITER ;');

Then I get
DELIMITER;

My expectation is that space will be preserved after DELIMITER.

  1. Error for forward slashes as DELIMITER.

If I execute

\SqlFormatter::format('DELIMITER //')

then I get ErrorException "Uninitialized string offset: 1"
line 217 in vendor/jdorn/sql-formatter/lib/SqlFormatter.php:

 if ($string[0] === '#' || (isset($string[1])&&($string[0]==='-'&&$string[1]==='-') || ($string[0]==='/'&&$string[1]==='*'))) {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions