Package org.flywaydb.core.internal.dbsupport

Examples of org.flywaydb.core.internal.dbsupport.SqlScript.execute()


            // This is how Flyway determines the database *type* (e.g. Postgres vs Oracle)
            DbSupport dbSupport = DbSupportFactory.createDbSupport(connection, false);

            // Load our SQL string & execute via Flyway's SQL parser
            SqlScript script = new SqlScript(sqlToExecute, dbSupport);
            script.execute(dbSupport.getJdbcTemplate());
        }
        catch(FlywayException fe)
        {
            // If any FlywayException (Runtime) is thrown, change it to a SQLException
            throw new SQLException("Flyway executeSql() error occurred", fe);
View Full Code Here


            for (File sqlFile : sqlFiles) {
                Resource resource = new FileSystemResource(sqlFile.getAbsolutePath());
                SqlScript script = new SqlScript(resource.loadAsString("UTF-8"), support);
                System.out.format("execute sql file: %s%n", sqlFile.getAbsolutePath());
                script.execute(support.getJdbcTemplate());
                filesExecuted++;
            }

            return filesExecuted;
        } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.