Class DB2Parser
- java.lang.Object
-
- migratedb.v1.core.internal.parser.BaseParser
-
- migratedb.v1.core.internal.database.db2.DB2Parser
-
- All Implemented Interfaces:
Parser
public class DB2Parser extends BaseParser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class migratedb.v1.core.internal.parser.BaseParser
BaseParser.ParserSqlStatementIterator
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.parser.BaseParser
LOG
-
-
Constructor Summary
Constructors Constructor Description DB2Parser(Configuration configuration, ParsingContext parsingContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadjustBlockDepth(ParserContext context, List<Token> tokens, Token keyword, PeekingReader reader)protected TokenhandleCommentDirective(PeekingReader reader, ParserContext context, int pos, int line, int col)protected booleanisCommentDirective(String peek)protected voidresetDelimiter(ParserContext context)Resets the delimiter to its default value before parsing a new statement.-
Methods inherited from class migratedb.v1.core.internal.parser.BaseParser
adjustDelimiter, closeAndAddSuppressed, createStatement, detectCanExecuteInTransaction, detectStatementType, doTokensMatchPattern, getAlternativeIdentifierQuote, getAlternativeStringLiteralQuote, getClosingIdentifierSymbol, getConfiguration, getDefaultDelimiter, getIdentifierQuote, getLastKeywordIndex, getLastKeywordIndex, getNextStatement, getOpeningIdentifierSymbol, getParsingContext, getPreviousToken, getTransactionalDetectionCutoff, getValidKeywords, handleAlternativeStringLiteral, handleDelimiter, handleKeyword, handleStringLiteral, isAlternativeStringLiteral, isDelimiter, isKeyword, isLetter, isSingleLineComment, lastTokenIs, lastTokenIsOnLine, parse, parse, readIdentifier, readKeyword, replacePlaceholders, shouldAdjustBlockDepth, shouldDiscard, supportsPeekingMultipleLines, tokenAtIndexIs
-
-
-
-
Constructor Detail
-
DB2Parser
public DB2Parser(Configuration configuration, ParsingContext parsingContext)
-
-
Method Detail
-
adjustBlockDepth
protected void adjustBlockDepth(ParserContext context, List<Token> tokens, Token keyword, PeekingReader reader) throws IOException
- Overrides:
adjustBlockDepthin classBaseParser- Throws:
IOException
-
resetDelimiter
protected void resetDelimiter(ParserContext context)
Description copied from class:BaseParserResets the delimiter to its default value before parsing a new statement.- Overrides:
resetDelimiterin classBaseParser
-
isCommentDirective
protected boolean isCommentDirective(String peek)
- Overrides:
isCommentDirectivein classBaseParser
-
handleCommentDirective
protected Token handleCommentDirective(PeekingReader reader, ParserContext context, int pos, int line, int col) throws IOException
- Overrides:
handleCommentDirectivein classBaseParser- Throws:
IOException
-
-