public class SqlGenerateUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
buildWhereConditionByPKs(List<String> pkNameList,
int rowSize,
String dbType) |
static String |
buildWhereConditionByPKs(List<String> pkNameList,
int rowSize,
String dbType,
int maxInSize)
each pk is a condition.the result will like :" (id,userCode) in ((?
|
static String |
buildWhereConditionByPKs(List<String> pkNameList,
String dbType)
each pk is a condition.the result will like :" id =?
|
static void |
setParamForPk(List<Map<String,Field>> pkRowsList,
List<String> pkColumnNameList,
PreparedStatement pst)
set parameter for PreparedStatement, this is only used in pk sql.
|
public static String buildWhereConditionByPKs(List<String> pkNameList, int rowSize, String dbType) throws SQLException
SQLExceptionpublic static String buildWhereConditionByPKs(List<String> pkNameList, int rowSize, String dbType, int maxInSize) throws SQLException
pkNameList - pk column name listrowSize - the row size of recordsdbType - the type of databasemaxInSize - the max in sizeSQLException - the sql exceptionpublic static void setParamForPk(List<Map<String,Field>> pkRowsList, List<String> pkColumnNameList, PreparedStatement pst) throws SQLException
pkRowsList - pkRowsListpkColumnNameList - pkColumnNameListpst - preparedStatementSQLException - SQLExceptionpublic static String buildWhereConditionByPKs(List<String> pkNameList, String dbType)
pkNameList - pkNameListdbType - dbTypeCopyright © 2022 Seata. All rights reserved.