Class sqlRun
java.lang.Object
edu.internet2.middleware.grouper.app.gsh.sqlRun
Run a sql script against DB (like ant does it)
- Since:
- 0.0.1
- Version:
- $Id: sqlRun.java,v 1.3 2008-11-13 20:26:10 mchyzer Exp $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreate tables and init schema (depending on configuration in grouper.properties)static intExecutes an SQL statement.static intinvoke(GrouperSession grouperSession, Object scriptFileOrString) Executes an SQL statement.
-
Constructor Details
-
sqlRun
public sqlRun()
-
-
Method Details
-
invoke
Create tables and init schema (depending on configuration in grouper.properties)- Parameters:
interpreter- BeanShell interpreter.stack- BeanShell call stack.scriptFile-- Since:
- 0.0.1
-
invoke
public static int invoke(bsh.Interpreter interpreter, bsh.CallStack stack, String sql) throws GrouperShellException Executes an SQL statement.- Parameters:
interpreter- BeanShell interpreter.stack- BeanShell call stack.sql-- Returns:
- int The number of updates made.
- Throws:
GrouperShellException- Since:
- 0.0.1
-
invoke
Executes an SQL statement.- Parameters:
grouperSession-scriptFileOrString-- Returns:
- int The number of updates made if executing a string.
-