-
Notifications
You must be signed in to change notification settings - Fork 5
Description
DbUp parses the text of each SQL script for two purposes:
- To identify replacement tokens for our variable replacement
- In order to split statements into batches (in SQL Server that's splitting on "GO" statements)
Currently these two purposes are handled using the same parsing logic. This issue was opened to split these two purposes into their own code paths so that each can be handled by appropriate code.
Initially the Variable Substitution parsing will keep the existing SqlParser functionality.
To split the SQL Server T-SQL statements, the parsing will be achieved using a Microsoft-supplied package called "Microsoft.SqlServer.DacFx" which includes a T-SQL parser. This offloads the responsibility for writing a performant, resiliant, compliant parser.
A simple LINQPad-based proof-of-concept to split SQL into batches using Microsoft.SqlServer.DacFx which you can see here: DacFx Parsing LINQPad POC
Edited from original comment posted by @AdrianJSClark in DbUp/DbUp#439 (comment)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status