Package org.flywaydb.database.mysql
Class MySQLParser
java.lang.Object
org.flywaydb.core.internal.parser.Parser
org.flywaydb.database.mysql.MySQLParser
- Direct Known Subclasses:
MariaDBParser
public class MySQLParser
extends org.flywaydb.core.internal.parser.Parser
-
Nested Class Summary
Nested classes/interfaces inherited from class org.flywaydb.core.internal.parser.Parser
org.flywaydb.core.internal.parser.Parser.ParserSqlStatementIterator -
Field Summary
Fields inherited from class org.flywaydb.core.internal.parser.Parser
configuration, parsingContext -
Constructor Summary
ConstructorsConstructorDescriptionMySQLParser(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.parser.ParsingContext parsingContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustBlockDepth(org.flywaydb.core.internal.parser.ParserContext context, List<org.flywaydb.core.internal.parser.Token> tokens, org.flywaydb.core.internal.parser.Token keyword, org.flywaydb.core.internal.parser.PeekingReader reader) protected org.flywaydb.core.internal.parser.StatementTypedetectStatementType(String simplifiedStatement, org.flywaydb.core.internal.parser.ParserContext context, org.flywaydb.core.internal.parser.PeekingReader reader) protected charprotected charprotected org.flywaydb.core.internal.parser.TokenhandleAlternativeStringLiteral(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col) protected org.flywaydb.core.internal.parser.TokenhandleCommentDirective(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col) protected org.flywaydb.core.internal.parser.TokenhandleKeyword(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col, String keyword) protected org.flywaydb.core.internal.parser.TokenhandleStringLiteral(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col) protected booleanisCommentDirective(String text) protected booleanisSingleLineComment(String peek, org.flywaydb.core.internal.parser.ParserContext context, int col) protected voidresetDelimiter(org.flywaydb.core.internal.parser.ParserContext context) protected booleanshouldAdjustBlockDepth(org.flywaydb.core.internal.parser.ParserContext context, List<org.flywaydb.core.internal.parser.Token> tokens, org.flywaydb.core.internal.parser.Token token) Methods inherited from class org.flywaydb.core.internal.parser.Parser
adjustDelimiter, createStatement, detectCanExecuteInTransaction, doTokensMatchPattern, getAlternativeIdentifierQuote, getClosingIdentifierSymbol, getDefaultDelimiter, getLastKeywordIndex, getLastKeywordIndex, getNextStatement, getOpeningIdentifierSymbol, getPreviousToken, getTransactionalDetectionCutoff, getValidKeywords, handleDelimiter, handleMultilineComment, isAlternativeStringLiteral, isDelimiter, isKeyword, isLetter, lastTokenIs, lastTokenIsOnLine, parse, parse, readIdentifier, readKeyword, replacePlaceholders, shouldDiscard, supportsPeekingMultipleLines, supportsReferencedSqlScripts, tokenAtIndexIs
-
Constructor Details
-
MySQLParser
public MySQLParser(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.parser.ParsingContext parsingContext)
-
-
Method Details
-
resetDelimiter
protected void resetDelimiter(org.flywaydb.core.internal.parser.ParserContext context) - Overrides:
resetDelimiterin classorg.flywaydb.core.internal.parser.Parser
-
handleKeyword
protected org.flywaydb.core.internal.parser.Token handleKeyword(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col, String keyword) throws IOException - Overrides:
handleKeywordin classorg.flywaydb.core.internal.parser.Parser- Throws:
IOException
-
getIdentifierQuote
protected char getIdentifierQuote()- Overrides:
getIdentifierQuotein classorg.flywaydb.core.internal.parser.Parser
-
getAlternativeStringLiteralQuote
protected char getAlternativeStringLiteralQuote()- Overrides:
getAlternativeStringLiteralQuotein classorg.flywaydb.core.internal.parser.Parser
-
isSingleLineComment
protected boolean isSingleLineComment(String peek, org.flywaydb.core.internal.parser.ParserContext context, int col) - Overrides:
isSingleLineCommentin classorg.flywaydb.core.internal.parser.Parser
-
handleStringLiteral
protected org.flywaydb.core.internal.parser.Token handleStringLiteral(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col) throws IOException - Overrides:
handleStringLiteralin classorg.flywaydb.core.internal.parser.Parser- Throws:
IOException
-
handleAlternativeStringLiteral
protected org.flywaydb.core.internal.parser.Token handleAlternativeStringLiteral(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col) throws IOException - Overrides:
handleAlternativeStringLiteralin classorg.flywaydb.core.internal.parser.Parser- Throws:
IOException
-
handleCommentDirective
protected org.flywaydb.core.internal.parser.Token handleCommentDirective(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.ParserContext context, int pos, int line, int col) throws IOException - Overrides:
handleCommentDirectivein classorg.flywaydb.core.internal.parser.Parser- Throws:
IOException
-
isCommentDirective
- Overrides:
isCommentDirectivein classorg.flywaydb.core.internal.parser.Parser
-
detectStatementType
protected org.flywaydb.core.internal.parser.StatementType detectStatementType(String simplifiedStatement, org.flywaydb.core.internal.parser.ParserContext context, org.flywaydb.core.internal.parser.PeekingReader reader) - Overrides:
detectStatementTypein classorg.flywaydb.core.internal.parser.Parser
-
shouldAdjustBlockDepth
protected boolean shouldAdjustBlockDepth(org.flywaydb.core.internal.parser.ParserContext context, List<org.flywaydb.core.internal.parser.Token> tokens, org.flywaydb.core.internal.parser.Token token) - Overrides:
shouldAdjustBlockDepthin classorg.flywaydb.core.internal.parser.Parser
-
adjustBlockDepth
protected void adjustBlockDepth(org.flywaydb.core.internal.parser.ParserContext context, List<org.flywaydb.core.internal.parser.Token> tokens, org.flywaydb.core.internal.parser.Token keyword, org.flywaydb.core.internal.parser.PeekingReader reader) - Overrides:
adjustBlockDepthin classorg.flywaydb.core.internal.parser.Parser
-