Class SqlBatchParser
This is the base implementation of the SQL batch parser
Inherited Members
Namespace: FluentMigrator.Runner.BatchParser
Assembly: FluentMigrator.Runner.Core.dll
Syntax
public class SqlBatchParser
Constructors
SqlBatchParser(IEnumerable<IRangeSearcher>, IEnumerable<ISpecialTokenSearcher>, string)
Initializes a new instance of the SqlBatchParser class.
Declaration
public SqlBatchParser(IEnumerable<IRangeSearcher> rangeSearchers, IEnumerable<ISpecialTokenSearcher> specialTokenSearchers, string newLine = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IRangeSearcher> | rangeSearchers | The range searchers to be used |
IEnumerable<ISpecialTokenSearcher> | specialTokenSearchers | The special token searchers to be used |
string | newLine | The new line sequence to be used for the output |
Methods
OnSpecialToken(SpecialTokenEventArgs)
Invokes the SpecialToken event
Declaration
protected virtual void OnSpecialToken(SpecialTokenEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
SpecialTokenEventArgs | e | The event arguments |
OnSqlText(SqlTextEventArgs)
Invokes the SqlText event
Declaration
protected virtual void OnSqlText(SqlTextEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
SqlTextEventArgs | e | The event arguments |
Process(ITextSource, bool)
Process the source
Declaration
public void Process(ITextSource source, bool stripComments = false)
Parameters
Type | Name | Description |
---|---|---|
ITextSource | source | The source to process/parse for SQL statement batches |
bool | stripComments |
|
Events
SpecialToken
An event handler that is called when a special token was found
Declaration
public event EventHandler<SpecialTokenEventArgs> SpecialToken
Event Type
Type | Description |
---|---|
EventHandler<SpecialTokenEventArgs> |
SqlText
An event handler that is called when an SQL text was collected and is considered complete
Declaration
public event EventHandler<SqlTextEventArgs> SqlText
Event Type
Type | Description |
---|---|
EventHandler<SqlTextEventArgs> |