public class NativeQuery extends Object
Modifier and Type | Field and Description |
---|---|
int[] |
bindPositions |
SqlCommand |
command |
boolean |
multiStatement |
String |
nativeSql |
Constructor and Description |
---|
NativeQuery(String nativeSql,
int[] bindPositions,
boolean multiStatement,
SqlCommand dml) |
NativeQuery(String nativeSql,
SqlCommand dml) |
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
appendBindName(StringBuilder sb,
int index) |
static 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() |
String |
toString(@Nullable ParameterList parameters)
Stringize this query to a human-readable form, substituting particular parameter values for
parameter placeholders.
|
public final String nativeSql
public final int[] bindPositions
public final SqlCommand command
public final boolean multiStatement
public NativeQuery(String nativeSql, SqlCommand dml)
public NativeQuery(String nativeSql, int[] bindPositions, boolean multiStatement, SqlCommand dml)
public String toString(@Nullable ParameterList parameters)
parameters
- a ParameterList returned by this Query's Query.createParameterList()
method, or null
to leave the parameter placeholders unsubstituted.public static String bindName(int index)
index
- index of a bind variablepublic static StringBuilder appendBindName(StringBuilder sb, int index)
public static int calculateBindLength(int bindCount)
bindCount
- total number of parameters in a querypublic SqlCommand getCommand()
Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.