public class BatchedQuery extends Object
Constructor and Description |
---|
BatchedQuery(NativeQuery query,
TypeTransferModeRegistry transferModeRegistry,
int valuesBraceOpenPosition,
int valuesBraceClosePosition,
boolean sanitiserDisabled) |
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.
|
BatchedQuery |
deriveForMultiBatch(int valueBlock) |
int |
getBatchSize()
Get the number of times this Query has been batched.
|
int |
getBindCount() |
int |
getMaxResultRowSize()
Return maximum size in bytes that each result row from this query may return.
|
String |
getNativeSql()
Method to return the sql based on number of batches.
|
Map<String,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).
|
org.postgresql.core.v3.SimpleQuery[] |
getSubqueries()
Return a list of the Query objects that make up this query.
|
boolean |
hasBinaryFields() |
boolean |
isEmpty() |
boolean |
isStatementDescribed() |
void |
resetNeedUpdateFieldFormats() |
void |
setHasBinaryFields(boolean hasBinaryFields) |
String |
toString()
Returns a string representation of the object.
|
String |
toString(ParameterList params)
Stringize this query to a human-readable form, substituting particular parameter values for
parameter placeholders.
|
public BatchedQuery(NativeQuery query, TypeTransferModeRegistry transferModeRegistry, int valuesBraceOpenPosition, int valuesBraceClosePosition, boolean sanitiserDisabled)
public BatchedQuery deriveForMultiBatch(int valueBlock)
public int getBatchSize()
Query
getBatchSize
in interface Query
addBatch()
has been called.public String getNativeSql()
getNativeSql
in interface Query
public String toString(ParameterList params)
Query
toString
in interface Query
params
- a ParameterList returned by this Query's Query.createParameterList()
method,
or null
to leave the parameter placeholders unsubstituted.public ParameterList createParameterList()
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 String toString()
java.lang.Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public void close()
Query
A closed Query should not be executed.
public org.postgresql.core.v3.SimpleQuery[] getSubqueries()
Query
getSubqueries
in interface Query
null
if this object is already a
single-statement query.public int getMaxResultRowSize()
IllegalStateException
- if the query is not describedpublic void resetNeedUpdateFieldFormats()
public boolean hasBinaryFields()
public void setHasBinaryFields(boolean hasBinaryFields)
public boolean isStatementDescribed()
isStatementDescribed
in interface Query
public final int getBindCount()
public Map<String,Integer> getResultSetColumnNameIndexMap()
Query
getResultSetColumnNameIndexMap
in interface Query
public SqlCommand getSqlCommand()
Query
getSqlCommand
in interface Query
Copyright © 2018 PostgreSQL Global Development Group. All rights reserved.