Class JDBCSQLHelper

java.lang.Object
marauroa.server.db.JDBCSQLHelper

public class JDBCSQLHelper extends Object
A helper class that runs SQL scripts.
Author:
miguel
  • Constructor Details

    • JDBCSQLHelper

      public JDBCSQLHelper(DBTransaction transaction)
      creates a new JDBCSQLHelper
      Parameters:
      transaction - DBTransaction
  • Method Details

    • runDBScript

      public boolean runDBScript(String file)
      This method runs a SQL file using the given transaction. You are responsible of beginning the transaction and commiting the changes or rollback on error.
      Parameters:
      file - The file name that contains the SQL commands.
      Returns:
      true if the whole file was executed or false in any other error.