Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL '#' syntax for inline comments isn't supported #65

Open
mike183 opened this issue Nov 16, 2022 · 0 comments
Open

MySQL '#' syntax for inline comments isn't supported #65

mike183 opened this issue Nov 16, 2022 · 0 comments

Comments

@mike183
Copy link

mike183 commented Nov 16, 2022

Currently it seems that this package doesn't support using the # syntax for inline comments in MySQL.

Example Input

select 1;
# inline comment
select 2

Expected Output

[
  {
    start: 1,
    end: 9,
    text: 'select 1;',
    type: 'SELECT',
    executionType: 'LISTING',
    parameters: []
  },
  {
    start: 29,
    end: 37,
    text: 'select 2\n',
    type: 'SELECT',
    executionType: 'LISTING',
    parameters: []
  }
]

Actual Output (with strict mode disabled)

[
  {
    start: 1,
    end: 9,
    text: 'select 1;',
    type: 'SELECT',
    executionType: 'LISTING',
    parameters: []
  },
  {
    start: 11,
    end: 36,
    text: '# inline comment\nselect 2\n',
    type: 'UNKNOWN',
    executionType: 'UNKNOWN',
    parameters: []
  }
]

Demo
Incase it's useful, I've also created a functioning demo here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant