Class SQLServerParser
- java.lang.Object
-
- migratedb.v1.core.internal.parser.BaseParser
-
- migratedb.v1.core.internal.database.sqlserver.SQLServerParser
-
- All Implemented Interfaces:
Parser
public class SQLServerParser 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 SQLServerParser(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 BooleandetectCanExecuteInTransaction(String simplifiedStatement, List<Token> keywords)protected chargetClosingIdentifierSymbol()protected DelimitergetDefaultDelimiter()protected chargetOpeningIdentifierSymbol()protected intgetTransactionalDetectionCutoff()protected booleanisDelimiter(String peek, ParserContext context, int col, int colIgnoringWhitespace)protected StringreadKeyword(PeekingReader reader, Delimiter delimiter, ParserContext context)protected booleanshouldAdjustBlockDepth(ParserContext context, List<Token> tokens, Token token)-
Methods inherited from class migratedb.v1.core.internal.parser.BaseParser
adjustDelimiter, closeAndAddSuppressed, createStatement, detectStatementType, doTokensMatchPattern, getAlternativeIdentifierQuote, getAlternativeStringLiteralQuote, getConfiguration, getIdentifierQuote, getLastKeywordIndex, getLastKeywordIndex, getNextStatement, getParsingContext, getPreviousToken, getValidKeywords, handleAlternativeStringLiteral, handleCommentDirective, handleDelimiter, handleKeyword, handleStringLiteral, isAlternativeStringLiteral, isCommentDirective, isKeyword, isLetter, isSingleLineComment, lastTokenIs, lastTokenIsOnLine, parse, parse, readIdentifier, replacePlaceholders, resetDelimiter, shouldDiscard, supportsPeekingMultipleLines, tokenAtIndexIs
-
-
-
-
Constructor Detail
-
SQLServerParser
public SQLServerParser(Configuration configuration, ParsingContext parsingContext)
-
-
Method Detail
-
getDefaultDelimiter
protected Delimiter getDefaultDelimiter()
- Overrides:
getDefaultDelimiterin classBaseParser
-
isDelimiter
protected boolean isDelimiter(String peek, ParserContext context, int col, int colIgnoringWhitespace)
- Overrides:
isDelimiterin classBaseParser
-
readKeyword
protected String readKeyword(PeekingReader reader, Delimiter delimiter, ParserContext context) throws IOException
- Overrides:
readKeywordin classBaseParser- Throws:
IOException
-
detectCanExecuteInTransaction
protected Boolean detectCanExecuteInTransaction(String simplifiedStatement, List<Token> keywords)
- Overrides:
detectCanExecuteInTransactionin classBaseParser
-
shouldAdjustBlockDepth
protected boolean shouldAdjustBlockDepth(ParserContext context, List<Token> tokens, Token token)
- Overrides:
shouldAdjustBlockDepthin classBaseParser
-
adjustBlockDepth
protected void adjustBlockDepth(ParserContext context, List<Token> tokens, Token keyword, PeekingReader reader) throws IOException
- Overrides:
adjustBlockDepthin classBaseParser- Throws:
IOException
-
getTransactionalDetectionCutoff
protected int getTransactionalDetectionCutoff()
- Overrides:
getTransactionalDetectionCutoffin classBaseParser- Returns:
- The cutoff point in terms of number of tokens after which a statement can no longer be non-transactional.
-
getOpeningIdentifierSymbol
protected char getOpeningIdentifierSymbol()
- Overrides:
getOpeningIdentifierSymbolin classBaseParser
-
getClosingIdentifierSymbol
protected char getClosingIdentifierSymbol()
- Overrides:
getClosingIdentifierSymbolin classBaseParser
-
-