public class NativeQuery
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int[] |
bindPositions |
SqlCommand |
command |
boolean |
multiStatement |
java.lang.String |
nativeSql |
| Constructor and Description |
|---|
NativeQuery(java.lang.String nativeSql,
int[] bindPositions,
boolean multiStatement,
SqlCommand dml) |
NativeQuery(java.lang.String nativeSql,
SqlCommand dml) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.StringBuilder |
appendBindName(java.lang.StringBuilder sb,
int index) |
static java.lang.String |
bindName(int index)
Returns $1, $2, etc names of bind variables used by backend.
|
static int |
calculateBindLength(int bindCount)
Calculate the text length required for the given number of bind variables
including dollars.
|
SqlCommand |
getCommand() |
java.lang.String |
toString(ParameterList parameters)
Stringize this query to a human-readable form, substituting particular parameter values for
parameter placeholders.
|
public final java.lang.String nativeSql
public final int[] bindPositions
public final SqlCommand command
public final boolean multiStatement
public NativeQuery(java.lang.String nativeSql,
SqlCommand dml)
public NativeQuery(java.lang.String nativeSql,
int[] bindPositions,
boolean multiStatement,
SqlCommand dml)
public java.lang.String toString(ParameterList parameters)
parameters - a ParameterList returned by this Query's Query.createParameterList()
method, or null to leave the parameter placeholders unsubstituted.public static java.lang.String bindName(int index)
index - index of a bind variablepublic static java.lang.StringBuilder appendBindName(java.lang.StringBuilder sb,
int index)
public static int calculateBindLength(int bindCount)
bindCount - total number of parameters in a querypublic SqlCommand getCommand()
Copyright © 2021 PostgreSQL Global Development Group. All rights reserved.