Class PostgreSQLParser

java.lang.Object
org.flywaydb.core.internal.parser.Parser
org.flywaydb.database.postgresql.PostgreSQLParser

public class PostgreSQLParser 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

    Constructors
    Constructor
    Description
    PostgreSQLParser(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.parser.ParsingContext parsingContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    protected org.flywaydb.core.internal.sqlscript.ParsedSqlStatement
    createStatement(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.Recorder recorder, int statementPos, int statementLine, int statementCol, int nonCommentPartPos, int nonCommentPartLine, int nonCommentPartCol, org.flywaydb.core.internal.parser.StatementType statementType, boolean canExecuteInTransaction, org.flywaydb.core.internal.sqlscript.Delimiter delimiter, String sql, boolean batchable)
     
    protected Boolean
    detectCanExecuteInTransaction(String simplifiedStatement, List<org.flywaydb.core.internal.parser.Token> keywords)
     
    protected org.flywaydb.core.internal.parser.StatementType
    detectStatementType(String simplifiedStatement, org.flywaydb.core.internal.parser.ParserContext context, org.flywaydb.core.internal.parser.PeekingReader reader)
     
    protected char
     
    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)
     

    Methods inherited from class org.flywaydb.core.internal.parser.Parser

    adjustDelimiter, doTokensMatchPattern, getAdditionalParsingErrorInfo, getAlternativeIdentifierQuote, getClosingIdentifierSymbol, getDefaultDelimiter, getIdentifierQuote, getLastKeywordIndex, getLastKeywordIndex, getNextStatement, getOpeningIdentifierSymbol, getPreviousToken, getTransactionalDetectionCutoff, getValidKeywords, handleCommentDirective, handleDelimiter, handleKeyword, handleMultilineComment, handleStringLiteral, isAlternativeStringLiteral, isCommentDirective, isDelimiter, isKeyword, isLetter, isSingleLineComment, lastTokenIs, lastTokenIsOnLine, parse, parse, readIdentifier, readKeyword, replacePlaceholders, resetDelimiter, shouldAdjustBlockDepth, shouldDiscard, supportsPeekingMultipleLines, supportsReferencedSqlScripts, tokenAtIndexIs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PostgreSQLParser

      public PostgreSQLParser(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.parser.ParsingContext parsingContext)
  • Method Details

    • getAlternativeStringLiteralQuote

      protected char getAlternativeStringLiteralQuote()
      Overrides:
      getAlternativeStringLiteralQuote in class org.flywaydb.core.internal.parser.Parser
    • createStatement

      protected org.flywaydb.core.internal.sqlscript.ParsedSqlStatement createStatement(org.flywaydb.core.internal.parser.PeekingReader reader, org.flywaydb.core.internal.parser.Recorder recorder, int statementPos, int statementLine, int statementCol, int nonCommentPartPos, int nonCommentPartLine, int nonCommentPartCol, org.flywaydb.core.internal.parser.StatementType statementType, boolean canExecuteInTransaction, org.flywaydb.core.internal.sqlscript.Delimiter delimiter, String sql, boolean batchable) throws IOException
      Overrides:
      createStatement in class org.flywaydb.core.internal.parser.Parser
      Throws:
      IOException
    • 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:
      adjustBlockDepth in class org.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:
      detectStatementType in class org.flywaydb.core.internal.parser.Parser
    • detectCanExecuteInTransaction

      protected Boolean detectCanExecuteInTransaction(String simplifiedStatement, List<org.flywaydb.core.internal.parser.Token> keywords)
      Overrides:
      detectCanExecuteInTransaction in class org.flywaydb.core.internal.parser.Parser
    • 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:
      handleAlternativeStringLiteral in class org.flywaydb.core.internal.parser.Parser
      Throws:
      IOException