public class BatchedQuery
extends java.lang.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.
|
java.lang.String |
getNativeSql()
Method to return the sql based on number of batches.
|
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).
|
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) |
java.lang.String |
toString() |
java.lang.String |
toString(ParameterList parameters)
Returns string representation of the query, substituting particular parameter values for
parameter placeholders.
|
java.lang.String |
toString(ParameterList params,
SqlSerializationContext context)
Returns string representation of the query, 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()
QuerygetBatchSize in interface QueryaddBatch() has been called.public java.lang.String getNativeSql()
getNativeSql in interface Querypublic java.lang.String toString(ParameterList params, SqlSerializationContext context)
QuerytoString in interface Queryparams - a ParameterList returned by this Query's Query.createParameterList() method,
or null to leave the parameter placeholders unsubstituted.context - specifies configuration for converting the parameters to stringpublic ParameterList createParameterList()
QueryIf 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 Querypublic java.lang.String toString(ParameterList parameters)
QueryNote: the method replaces the values on a best-effort basis as it might omit the replacements
for parameters that can't be processed several times. For instance, InputStream
can be processed only once.
toString in interface Queryparameters - a ParameterList returned by this Query's Query.createParameterList() method,
or null to leave the parameter placeholders unsubstituted.public java.lang.String toString()
toString in class java.lang.Objectpublic void close()
QueryA closed Query should not be executed.
public org.postgresql.core.v3.SimpleQuery[] getSubqueries()
QuerygetSubqueries in interface Querynull if this object is already a
single-statement query.public int getMaxResultRowSize()
Results are cached until/unless the query is re-described.
java.lang.IllegalStateException - if the query is not describedpublic void resetNeedUpdateFieldFormats()
public boolean hasBinaryFields()
public void setHasBinaryFields(boolean hasBinaryFields)
public boolean isStatementDescribed()
isStatementDescribed in interface Querypublic final int getBindCount()
public java.util.Map<java.lang.String,java.lang.Integer> getResultSetColumnNameIndexMap()
QuerygetResultSetColumnNameIndexMap in interface Querypublic SqlCommand getSqlCommand()
QuerygetSqlCommand in interface QueryCopyright © 2025 PostgreSQL Global Development Group. All rights reserved.