sqldelight / sql-psi

An extendable parsing environment for sql which outputs PSI
Apache License 2.0
96 stars 27 forks source link

Fail ordered sql files if they end with a transaction open #223

Open AlecKazakova opened 4 years ago

AlecKazakova commented 4 years ago

Dialect: ALL

failing sql:

BEGIN TRANSACTION;

-- do stuff

should fail to compile because the transaction wasn't closed

hfhbd commented 2 years ago

Don't you just need a rule: transaction_scope ::= BEGIN TRANSACTION stmt * END TRANSACTION? 🤔 I don't see a good use case to have transactions opened over several files.