パッケージ org.postgresql.core
クラス NativeQuery
java.lang.Object
org.postgresql.core.NativeQuery
Represents a query that is ready for execution by backend. The main difference from JDBC is ? are
replaced with $1, $2, etc.
-
フィールドの概要
フィールド -
コンストラクタの概要
コンストラクタコンストラクタ説明NativeQuery
(String nativeSql, int @Nullable [] bindPositions, boolean multiStatement, SqlCommand dml) NativeQuery
(String nativeSql, SqlCommand dml) -
メソッドの概要
修飾子とタイプメソッド説明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.toString
(@Nullable ParameterList parameters) Stringize this query to a human-readable form, substituting particular parameter values for parameter placeholders.
-
フィールド詳細
-
nativeSql
-
bindPositions
public final int[] bindPositions -
command
-
multiStatement
public final boolean multiStatement
-
-
コンストラクタの詳細
-
NativeQuery
-
NativeQuery
public NativeQuery(String nativeSql, int @Nullable [] bindPositions, boolean multiStatement, SqlCommand dml)
-
-
メソッドの詳細
-
toString
Stringize this query to a human-readable form, substituting particular parameter values for parameter placeholders.- パラメータ:
parameters
- a ParameterList returned by this Query'sQuery.createParameterList()
method, ornull
to leave the parameter placeholders unsubstituted.- 戻り値:
- a human-readable representation of this query
-
bindName
Returns $1, $2, etc names of bind variables used by backend.- パラメータ:
index
- index of a bind variable- 戻り値:
- bind variable name
-
appendBindName
-
calculateBindLength
public static int calculateBindLength(int bindCount) Calculate the text length required for the given number of bind variables including dollars. Do this to avoid repeated calls to AbstractStringBuilder.expandCapacity(...) and Arrays.copyOf- パラメータ:
bindCount
- total number of parameters in a query- 戻り値:
- int total character length for $xyz kind of binds
-
getCommand
-