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

Search for specified delimeter to split transactions #317

Open
kudrevatykh opened this issue Sep 15, 2023 · 2 comments
Open

Search for specified delimeter to split transactions #317

kudrevatykh opened this issue Sep 15, 2023 · 2 comments

Comments

@kudrevatykh
Copy link

We use liquibase formatted sql format for our migrations https://docs.liquibase.com/concepts/changelogs/sql-format.html
Problem occurs when we use several changes in single sql file. squawk considers that all changes in file are run in single transaction becase we use --assume-in-transaction flag.
It would be nice if squawk split migration file in several transactions by user-specified delimeter (in our case if line starts with --changeset it means that different transaction starts). Now we mandated to write each migration in separate file.

@sbdchd
Copy link
Owner

sbdchd commented Sep 15, 2023

One tricky thing is the Postgres parser doesn't return AST nodes for comments so we'd have to bolt something on top for that

@kudrevatykh
Copy link
Author

I think such splitting could be made before Postgres parser.

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

No branches or pull requests

2 participants