Package org.voltdb
Class SQLStmt
java.lang.Object
org.voltdb.SQLStmt
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
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
canonicalizeStmt
(String stmtStr) Get the join order hint supplied in the constructor.getText()
Get the text of the SQL statement represented.boolean
Is this a read only statement?void
setInCatalog
(boolean inCatalog)
-
Constructor Details
-
SQLStmt
Construct a SQLStmt instance from a SQL statement.- Parameters:
sqlText
- Valid VoltDB compliant SQL with question marks as parameter place holders.
-
SQLStmt
Construct a SQLStmt instance from a SQL statement.- Parameters:
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 in
-
-
Method Details
-
getText
Get the text of the SQL statement represented.- Returns:
- String containing the text of the SQL statement represented.
-
getJoinOrder
Get the join order hint supplied in the constructor.- Returns:
- String containing the join order hint.
-
isReadOnly
public boolean isReadOnly()Is this a read only statement?- Returns:
- true if it's read only, false otherwise
-
canonicalizeStmt
-
setInCatalog
public void setInCatalog(boolean inCatalog)
-