Class ParsedSqlStatement

    • Constructor Detail

      • ParsedSqlStatement

        public ParsedSqlStatement​(int pos,
                                  int line,
                                  int col,
                                  String sql,
                                  Delimiter delimiter,
                                  boolean canExecuteInTransaction)
    • Method Detail

      • getPos

        public int getPos()
      • getLine

        public int getLine()
      • getCol

        public int getCol()
      • getLineNumber

        public final int getLineNumber()
        Specified by:
        getLineNumber in interface SqlStatement
        Returns:
        The original line number where the statement was located in the script it came from.
      • getSql

        public final String getSql()
        Specified by:
        getSql in interface SqlStatement
        Returns:
        The sql to send to the database.
      • canExecuteInTransaction

        public boolean canExecuteInTransaction()
        Description copied from interface: SqlStatement
        Whether the execution should take place inside a transaction. Almost all implementation should return true. This however makes it possible to execute certain migrations outside a transaction. This is useful for databases like PostgreSQL and SQL Server where certain statement can only execute outside a transaction.
        Specified by:
        canExecuteInTransaction in interface SqlStatement
        Returns:
        true if a transaction should be used (highly recommended), or false if not.
      • execute

        public Results execute​(JdbcTemplate jdbcTemplate)
        Description copied from interface: SqlStatement
        Executes this statement against the database.
        Specified by:
        execute in interface SqlStatement
        Parameters:
        jdbcTemplate - The jdbcTemplate to use to execute this script.
        Returns:
        the result of the execution.