org.millscript.millscript.functions
Class JdbcExecuteUpdateFunction
java.lang.Object
org.millscript.millscript.functions.Function
org.millscript.millscript.functions.JdbcExecuteUpdateFunction
public class JdbcExecuteUpdateFunction
- extends Function
Thsi class implements a millscript function to execute an SQL update through
the JDBC interface. The update is done using a prepared statement, which
should improve efficiency for multiple updates. The generated function
requires at least one argument, which will be the DataSource for the update.
Any subsequent arguments are treated as parameters for the prepared
statement.
f( datasource, arg1, arg2, arg3, ... )
The function returns the number of rows changed.
- Since:
- 9.6.4
|
Constructor Summary |
JdbcExecuteUpdateFunction(java.lang.String sqlString)
Construct a new function which will execute the specifed SQL as a
prepared statement. |
|
Method Summary |
void |
apply(Machine mc,
int nargs)
Performs this function using the specified machine, with the specified
number of arguments. |
java.lang.String |
toString()
Returns a string representation of this function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JdbcExecuteUpdateFunction
public JdbcExecuteUpdateFunction(java.lang.String sqlString)
- Construct a new function which will execute the specifed SQL as a
prepared statement.
- Parameters:
sqlString - the string containing SQL to prepare and execute
apply
public void apply(Machine mc,
int nargs)
- Description copied from class:
Function
- Performs this function using the specified machine, with the specified
number of arguments.
- Specified by:
apply in class Function
- Parameters:
mc - the machine to perform this function onnargs - the number of arguments the function is being invoked with- See Also:
Function.apply(org.millscript.millscript.vm.Machine, int)
toString
public java.lang.String toString()
- Returns a string representation of this function. It shows that it
requires one or more arguments.
- Overrides:
toString in class Function
- Returns:
- a string representation of this function
- See Also:
Object.toString()
Copyright © 2001-2007 Open World Ltd. All Rights Reserved.