Package org.dbos.apiary.voltdb
Class VoltContext
java.lang.Object
org.dbos.apiary.function.ApiaryContext
org.dbos.apiary.function.ApiaryTransactionalContext
org.dbos.apiary.voltdb.VoltContext
VoltContext is a context for Apiary-VoltDB functions.
It provides methods for accessing a VoltDB database.
-
Field Summary
Fields inherited from class org.dbos.apiary.function.ApiaryContext
execID, functionID, provBuff, service
-
Constructor Summary
ConstructorsConstructorDescriptionVoltContext
(VoltFunction p, ProvenanceBuffer provBuff, String service, long execID, long functionID) -
Method Summary
Modifier and TypeMethodDescriptionapiaryCallFunction
(String name, Object... inputs) Public Interface for functions.For internal use only.org.voltdb.VoltTable[]
executeQuery
(org.voltdb.SQLStmt procedure, Object... input) Execute a database query.void
executeUpdate
(org.voltdb.SQLStmt procedure, Object... input) Execute a database update.void
recordExecution
(FunctionOutput output) For internal use only.Methods inherited from class org.dbos.apiary.function.ApiaryTransactionalContext
apiaryGetTransactionId
Methods inherited from class org.dbos.apiary.function.ApiaryContext
apiaryQueueFunction, getFunctionOutput
-
Constructor Details
-
VoltContext
public VoltContext(VoltFunction p, ProvenanceBuffer provBuff, String service, long execID, long functionID)
-
-
Method Details
-
apiaryCallFunction
Description copied from class:ApiaryTransactionalContext
Public Interface for functions.- Specified by:
apiaryCallFunction
in classApiaryTransactionalContext
- Parameters:
name
- the fully-qualified name of the invoked function.inputs
- the list of arguments provided to the invoked function.- Returns:
- an
FunctionOutput
object that stores the output from a function.
-
checkPreviousExecution
Description copied from class:ApiaryContext
For internal use only.- Specified by:
checkPreviousExecution
in classApiaryContext
- Returns:
FunctionOutput
-
recordExecution
Description copied from class:ApiaryContext
For internal use only.- Specified by:
recordExecution
in classApiaryContext
- Parameters:
output
- the finalized output of a function.
-
executeUpdate
Execute a database update.- Parameters:
procedure
- a SQL DML statement (e.g., INSERT, UPDATE, DELETE).input
- input parameters for the SQL statement.
-
executeQuery
Execute a database query.- Parameters:
procedure
- a SQL query.input
- input parameters for the SQL statement.
-