class CompositeQuery extends java.lang.Object implements Query
Modifier and Type | Field and Description |
---|---|
private int[] |
offsets |
private SimpleQuery[] |
subqueries |
Constructor and Description |
---|
CompositeQuery(SimpleQuery[] subqueries,
int[] offsets) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this query and free any server-side resources associated with it.
|
ParameterList |
createParameterList()
Create a ParameterList suitable for storing parameters associated with this Query.
|
int |
getBatchSize()
Get the number of times this Query has been batched.
|
java.lang.String |
getNativeSql()
Returns SQL in native for database format.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getResultSetColumnNameIndexMap()
Get a map that a result set can use to find the index associated to a name.
|
SqlCommand |
getSqlCommand()
Returns properties of the query (sql keyword, and some other parsing info).
|
Query[] |
getSubqueries()
Return a list of the Query objects that make up this query.
|
boolean |
isEmpty() |
boolean |
isStatementDescribed() |
java.lang.String |
toString() |
java.lang.String |
toString(ParameterList parameters)
Stringize this query to a human-readable form, substituting particular parameter values for
parameter placeholders.
|
private final SimpleQuery[] subqueries
private final int[] offsets
CompositeQuery(SimpleQuery[] subqueries, int[] offsets)
public ParameterList createParameterList()
Query
Create a ParameterList suitable for storing parameters associated with this Query.
If this query has no parameters, a ParameterList will be returned, but it may be a shared immutable object. If this query does have parameters, the returned ParameterList is a new list, unshared by other callers.
createParameterList
in interface Query
public java.lang.String toString(ParameterList parameters)
Query
toString
in interface Query
parameters
- a ParameterList returned by this Query's Query.createParameterList()
method,
or null
to leave the parameter placeholders unsubstituted.public java.lang.String getNativeSql()
Query
getNativeSql
in interface Query
public SqlCommand getSqlCommand()
Query
getSqlCommand
in interface Query
public java.lang.String toString()
toString
in class java.lang.Object
public void close()
Query
Close this query and free any server-side resources associated with it. The resources may not be immediately deallocated, but closing a Query may make the deallocation more prompt.
A closed Query should not be executed.
public Query[] getSubqueries()
Query
getSubqueries
in interface Query
null
if this object is already a
single-statement query.public boolean isStatementDescribed()
isStatementDescribed
in interface Query
public int getBatchSize()
Query
getBatchSize
in interface Query
addBatch()
has been called.public java.util.Map<java.lang.String,java.lang.Integer> getResultSetColumnNameIndexMap()
Query
getResultSetColumnNameIndexMap
in interface Query