com.googlecode.flyway.core.migration.sql
Class SqlStatement

java.lang.Object
  extended by com.googlecode.flyway.core.migration.sql.SqlStatement

public class SqlStatement
extends java.lang.Object

A sql statement from a script that can be executed at once against a database.


Constructor Summary
SqlStatement(int lineNumber, java.lang.String sql)
          Creates a new sql statement.
 
Method Summary
 void execute(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
          Executes this statement against the database.
 int getLineNumber()
           
 java.lang.String getSql()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlStatement

public SqlStatement(int lineNumber,
                    java.lang.String sql)
Creates a new sql statement.

Parameters:
lineNumber - The original line number where the statement was located in the script it came from.
sql - The sql to send to the database.
Method Detail

getLineNumber

public int getLineNumber()
Returns:
The original line number where the statement was located in the script it came from.

getSql

public java.lang.String getSql()
Returns:
The sql to send to the database.

execute

public void execute(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Executes this statement against the database.

Parameters:
jdbcTemplate - The jdbc template to use to execute this statement.


Copyright © 2011. All Rights Reserved.