类 DefaultDialectUtils
- java.lang.Object
-
- org.sagacity.sqltoy.dialect.utils.DefaultDialectUtils
-
public class DefaultDialectUtils extends Object
- 版本:
- v1.0, Date:2021-5-20
- 作者:
- zhongxuchen
-
-
构造器概要
构造器 构造器 说明 DefaultDialectUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static LongdeleteAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, Connection conn, Integer dbType, Boolean autoCommit, String tableName)static QueryResultfindPageBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long pageNo, Integer pageSize, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)static QueryResultfindTopBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Integer topSize, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)static QueryResultgetRandomResult(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long totalCount, Long randomCount, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)static List<ColumnMeta>getTableColumns(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect)static Map<String,ColumnMeta>getTablePrimaryKeys(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect)static List<TableMeta>getTables(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect)static SerializableupdateSaveFetch(SqlToyContext sqlToyContext, Serializable entity, UpdateRowHandler updateRowHandler, String[] uniqueProps, Connection conn, Integer dbType, String dialect, String tableName)
-
-
-
方法详细资料
-
getRandomResult
public static QueryResult getRandomResult(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long totalCount, Long randomCount, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-queryExecutor-totalCount-randomCount-conn-dbType-dialect-fetchSize-maxRows-- 返回:
- 抛出:
Exception
-
findPageBySql
public static QueryResult findPageBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long pageNo, Integer pageSize, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-queryExecutor-pageNo-pageSize-conn-dbType-dialect-fetchSize-maxRows-- 返回:
- 抛出:
Exception
-
findTopBySql
public static QueryResult findTopBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Integer topSize, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-queryExecutor-topSize-conn-dbType-dialect-fetchSize-maxRows-- 返回:
- 抛出:
Exception
-
deleteAll
public static Long deleteAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, Connection conn, Integer dbType, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-conn-dbType-autoCommit-tableName-- 返回:
- 抛出:
Exception
-
updateSaveFetch
public static Serializable updateSaveFetch(SqlToyContext sqlToyContext, Serializable entity, UpdateRowHandler updateRowHandler, String[] uniqueProps, Connection conn, Integer dbType, String dialect, String tableName) throws Exception
- 参数:
sqlToyContext-entity-updateRowHandler-uniqueProps-conn-dbType-dialect-tableName-- 返回:
- 抛出:
Exception
-
getTableColumns
public static List<ColumnMeta> getTableColumns(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect) throws Exception
- 抛出:
Exception
-
getTablePrimaryKeys
public static Map<String,ColumnMeta> getTablePrimaryKeys(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect) throws Exception
- 参数:
catalog-schema-tableName-conn-dbType-dialect-- 返回:
- 抛出:
Exception
-
-