public class SQLStmt
extends java.lang.Object
A simple wrapper of a parameterized SQL statement. VoltDB uses this instead of a Java String type for performance reasons and to cache statement meta-data like result schema, compiled plan, etc..
SQLStmts are used exclusively in subclasses of VoltProcedure
VoltProcedure
Constructor and Description |
---|
SQLStmt(java.lang.String sqlText)
Construct a SQLStmt instance from a SQL statement.
|
SQLStmt(java.lang.String sqlText,
java.lang.String joinOrder)
Construct a SQLStmt instance from a SQL statement.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
canonicalizeStmt(java.lang.String stmtStr) |
java.lang.String |
getJoinOrder()
Get the join order hint supplied in the constructor.
|
java.lang.String |
getText()
Get the text of the SQL statement represented.
|
boolean |
isReadOnly()
Is this a read only statement?
|
public SQLStmt(java.lang.String sqlText)
sqlText
- Valid VoltDB compliant SQL with question marks as parameter
place holders.public SQLStmt(java.lang.String sqlText, java.lang.String joinOrder)
sqlText
- Valid VoltDB compliant SQL with question marks as parameter
place holders.joinOrder
- separated list of tables used by the query specifying the order they should be joined inpublic java.lang.String getText()
public java.lang.String getJoinOrder()
public boolean isReadOnly()
public static java.lang.String canonicalizeStmt(java.lang.String stmtStr)