aharpervc opened a new pull request, #1810: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1810
Adjacent to: https://github.com/apache/datafusion-sqlparser-rs/pull/1808 with similar considerations --- This PR introduces support for parsing `CREATE TRIGGER` for SQL Server. The main concern is that for the existing dialects, there was an expectation of an `EXECUTE` keyword (PG: https://www.postgresql.org/docs/current/sql-createtrigger.html). However, SQL Server doesn't use this syntax and instead supports multi statement blocks (like a stored procedure). The difficulty here in the codebase is what to do about CreateTrigger.exec_body & TriggerExecBody. In this iteration I made the property an `Option`, which seemed like the least impact on existing code. TriggerExecBody, etc can be left alone. However in the future I think this could be improved with a more broad refactoring, such as a TriggerBody enum, which can consolidate TriggerExecBodyType's options & use `Vec<Statements>` for a `MultiStatement` variant and `FunctionDesc` for `Function` & `Procedure` variants. That'd basically remove the TriggerExecBody struct, too. Overall I think that'd be a cleaner approach for the CreateTrigger struct. --- That's all speculative followup work, for now I just want to be able to parse most SQL Server triggers. Other SQL Server specific things like particular trigger options, DDL trigger stuff, etc can come later as needed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org