Skip to content

Support custom delimiters for separating SQL queries in .sql files #1681

@PatrickJahner

Description

@PatrickJahner

In our projects we work with large .sql files that contain multiple queries. For technical reasons, not all of these queries can be terminated with a semicolon (;).
Because of this, we separate individual queries using a custom delimiter.

Example:

sql_query_one
select
  username
from users

//--------------------------------------------------------//
sql_query_two
select
  family_name
from users

//--------------------------------------------------------//
sql_query_three
-- ...

It would be extremely helpful if the extension allowed defining a custom query delimiter (e.g. "//--------------------------------------------------------//" in our case) so that the editor can correctly detect, highlight, and navigate between separate queries.

This feature would improve working with large SQL files that cannot rely on ; as a terminator.

I really appreciate the project - fantastic work.
It's a pity that the extension is closed-source, otherwise I would gladly submit a pull request for this feature.

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