接口 Dialect
-
- 所有已知实现类:
ClickHouseDialect,DB2Dialect,DefaultDialect,DMDialect,GaussDBDialect,H2Dialect,ImpalaDialect,KingbaseDialect,MySqlDialect,OceanBaseDialect,Oracle11gDialect,OracleDialect,PostgreSqlDialect,SqliteDialect,SqlServerDialect,TDengineDialect,TidbDialect
public interface Dialect- 版本:
- v1.0,Date:2013-8-29
- 作者:
- zhongxuchen
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Longdelete(SqlToyContext sqlToyContext, Serializable entity, Connection conn, Integer dbType, String dialect, String tableName)LongdeleteAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)StoreResultexecuteStore(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] inParamsValue, Integer[] outParamsType, Connection conn, Integer dbType, String dialect, int fetchSize)QueryResultfindBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] paramsValue, QueryExecutorExtend queryExecutorExtend, DecryptHandler decryptHandler, Connection conn, LockMode lockMode, Integer dbType, String dialect, int fetchSize, int maxRows)QueryResultfindPageBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long pageNo, Integer pageSize, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)QueryResultfindTopBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Integer topSize, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)LonggetCountBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] paramsValue, boolean isLastSql, Connection conn, Integer dbType, String dialect)QueryResultgetRandomResult(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long totalCount, Long randomCount, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)List<ColumnMeta>getTableColumns(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect)List<TableMeta>getTables(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect)booleanisUnique(SqlToyContext sqlToyContext, Serializable entity, String[] paramsNamed, Connection conn, Integer dbType, String tableName)Serializableload(SqlToyContext sqlToyContext, Serializable entity, List<Class> cascadeTypes, LockMode lockMode, Connection conn, Integer dbType, String dialect, String tableName)List<?>loadAll(SqlToyContext sqlToyContext, List<?> entities, List<Class> cascadeTypes, LockMode lockMode, Connection conn, Integer dbType, String dialect, String tableName, int fetchSize, int maxRows)Objectsave(SqlToyContext sqlToyContext, Serializable entity, Connection conn, Integer dbType, String dialect, String tableName)LongsaveAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)LongsaveAllIgnoreExist(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)LongsaveOrUpdate(SqlToyContext sqlToyContext, Serializable entity, String[] forceUpdateFields, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)LongsaveOrUpdateAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, String[] forceUpdateFields, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)Longupdate(SqlToyContext sqlToyContext, Serializable entity, String[] forceUpdateFields, boolean cascade, Class[] forceCascadeClass, HashMap<Class,String[]> subTableForceUpdateProps, Connection conn, Integer dbType, String dialect, String tableName)LongupdateAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, String[] uniqueFields, String[] forceUpdateFields, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)QueryResultupdateFetch(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] paramValues, UpdateRowHandler updateRowHandler, Connection conn, Integer dbType, String dialect, LockMode lockMode, int fetchSize, int maxRows)SerializableupdateSaveFetch(SqlToyContext sqlToyContext, Serializable entity, UpdateRowHandler updateRowHandler, String[] uniqueProps, Connection conn, Integer dbType, String dialect, String tableName)
-
-
-
方法详细资料
-
isUnique
boolean isUnique(SqlToyContext sqlToyContext, Serializable entity, String[] paramsNamed, Connection conn, Integer dbType, String tableName)
- 参数:
sqlToyContext-entity-paramsNamed- 对象属性名称(不是数据库表字段名称)conn-dbType-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
-
getRandomResult
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
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
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
-
findBySql
QueryResult findBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] paramsValue, QueryExecutorExtend queryExecutorExtend, DecryptHandler decryptHandler, Connection conn, LockMode lockMode, Integer dbType, String dialect, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-sql-paramsValue-queryExecutorExtend-decryptHandler-conn-lockMode-dbType-dialect-fetchSize-maxRows- 设置最大查询记录,一般无需设置- 返回:
- 抛出:
Exception
-
getCountBySql
Long getCountBySql(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] paramsValue, boolean isLastSql, Connection conn, Integer dbType, String dialect) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-sql-paramsValue-isLastSql-conn-dbType-dialect-- 返回:
- 抛出:
Exception
-
load
Serializable load(SqlToyContext sqlToyContext, Serializable entity, List<Class> cascadeTypes, LockMode lockMode, Connection conn, Integer dbType, String dialect, String tableName) throws Exception
- 参数:
sqlToyContext-entity-cascadeTypes-lockMode-conn-dbType-dialect-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
loadAll
List<?> loadAll(SqlToyContext sqlToyContext, List<?> entities, List<Class> cascadeTypes, LockMode lockMode, Connection conn, Integer dbType, String dialect, String tableName, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-entities-cascadeTypes-lockMode-conn-dbType-dialect-tableName- 分表场景对应取得的表名(无分表则当前表名)fetchSize-maxRows-- 返回:
- 抛出:
Exception
-
save
Object save(SqlToyContext sqlToyContext, Serializable entity, Connection conn, Integer dbType, String dialect, String tableName) throws Exception
- 参数:
sqlToyContext-entity-conn-dbType-dialect-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
saveAll
Long saveAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-reflectPropsHandler- 此参数已经无实际意义conn-dbType-dialect-autoCommit-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
update
Long update(SqlToyContext sqlToyContext, Serializable entity, String[] forceUpdateFields, boolean cascade, Class[] forceCascadeClass, HashMap<Class,String[]> subTableForceUpdateProps, Connection conn, Integer dbType, String dialect, String tableName) throws Exception
- 参数:
sqlToyContext-entity-forceUpdateFields-cascade-forceCascadeClass-subTableForceUpdateProps-conn-dbType-dialect-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
updateSaveFetch
Serializable updateSaveFetch(SqlToyContext sqlToyContext, Serializable entity, UpdateRowHandler updateRowHandler, String[] uniqueProps, Connection conn, Integer dbType, String dialect, String tableName) throws Exception
- 参数:
sqlToyContext-entity-updateRowHandler-uniqueProps- 唯一性pojo属性,为空默认为主键字段conn-dbType-dialect-tableName-- 返回:
- 抛出:
Exception
-
updateAll
Long updateAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, String[] uniqueFields, String[] forceUpdateFields, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-uniqueFields-forceUpdateFields-reflectPropsHandler- 此参数已经无实际意义conn-dbType-dialect-autoCommit-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
saveOrUpdate
Long saveOrUpdate(SqlToyContext sqlToyContext, Serializable entity, String[] forceUpdateFields, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entity-forceUpdateFields-conn-dbType-dialect-autoCommit-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
saveOrUpdateAll
Long saveOrUpdateAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, String[] forceUpdateFields, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-reflectPropsHandler- 此参数已经无实际意义forceUpdateFields-conn-dbType-dialect-autoCommit-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
saveAllIgnoreExist
Long saveAllIgnoreExist(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-reflectPropsHandler- 此参数已经无实际意义conn-dbType-dialect-autoCommit-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
delete
Long delete(SqlToyContext sqlToyContext, Serializable entity, Connection conn, Integer dbType, String dialect, String tableName) throws Exception
- 参数:
sqlToyContext-entity-conn-dbType-dialect-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
deleteAll
Long deleteAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-conn-dbType-dialect-autoCommit-tableName- 分表场景对应取得的表名(无分表则当前表名)- 返回:
- 抛出:
Exception
-
updateFetch
QueryResult updateFetch(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] paramValues, UpdateRowHandler updateRowHandler, Connection conn, Integer dbType, String dialect, LockMode lockMode, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-sql-paramValues-updateRowHandler-conn-dbType-dialect-lockMode-fetchSize-maxRows-- 返回:
- 抛出:
Exception
-
executeStore
StoreResult executeStore(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, String sql, Object[] inParamsValue, Integer[] outParamsType, Connection conn, Integer dbType, String dialect, int fetchSize) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-sql-inParamsValue-outParamsType-conn-dbType-dialect-fetchSize-- 返回:
- 抛出:
Exception
-
getTableColumns
List<ColumnMeta> getTableColumns(String catalog, String schema, String tableName, Connection conn, Integer dbType, String dialect) throws Exception
- 参数:
catalog-schema-tableName-conn-dbType-dialect-- 返回:
- 抛出:
Exception
-
-