public class AnsiSqlDialect extends Dialect
A clever person solves a problem. A wise person avoids it.
Dialect.Holder
keepByteAndShort, modelBuilder, recordBuilder
Constructor and Description |
---|
AnsiSqlDialect() |
Modifier and Type | Method and Description |
---|---|
<T> List<T> |
buildModel(ResultSet rs,
Class<? extends Model> modelClass,
int pageSize) |
void |
fillStatement(PreparedStatement pst,
List<Object> paras) |
void |
fillStatement(PreparedStatement pst,
Object... paras) |
String |
forDbDeleteById(String tableName,
String[] pKeys) |
String |
forDbFindById(String tableName,
String[] pKeys) |
void |
forDbSave(String tableName,
String[] pKeys,
Record record,
StringBuilder sql,
List<Object> paras) |
void |
forDbUpdate(String tableName,
String[] pKeys,
Object[] ids,
Record record,
StringBuilder sql,
List<Object> paras) |
String |
forModelDeleteById(Table table) |
String |
forModelFindById(Table table,
String columns) |
void |
forModelSave(Table table,
Map<String,Object> attrs,
StringBuilder sql,
List<Object> paras) |
void |
forModelUpdate(Table table,
Map<String,Object> attrs,
Set<String> modifyFlag,
StringBuilder sql,
List<Object> paras) |
String |
forPaginate(int pageNumber,
int pageSize,
StringBuilder findSql)
SELECT * FROM subject t1 WHERE (SELECT count(*) FROM subject t2 WHERE t2.id < t1.id AND t2.key = '123') > = 10 AND (SELECT count(*) FROM subject t2 WHERE t2.id < t1.id AND t2.key = '123') < 20 AND t1.key = '123'
|
String |
forTableBuilderDoBuild(String tableName) |
boolean |
isTakeOverDbPaginate() |
boolean |
isTakeOverModelPaginate() |
Page<Record> |
takeOverDbPaginate(Connection conn,
int pageNumber,
int pageSize,
Boolean isGroupBySql,
String totalRowSql,
StringBuilder findSql,
Object... paras) |
Page<? extends Model> |
takeOverModelPaginate(Connection conn,
Class<? extends Model> modelClass,
int pageNumber,
int pageSize,
Boolean isGroupBySql,
String totalRowSql,
StringBuilder findSql,
Object... paras) |
buildModelList, buildRecordList, fillStatementHandleDateType, fillStatementHandleDateType, getDefaultPrimaryKey, getModelGeneratedKey, getRecordGeneratedKey, isKeepByteAndShort, isOracle, isPrimaryKey, processGeneratedBigIntegerKey, replaceOrderBy, setKeepByteAndShort, setModelBuilder, setRecordBuilder, trimPrimaryKeys
public String forTableBuilderDoBuild(String tableName)
forTableBuilderDoBuild
in class Dialect
public void forModelSave(Table table, Map<String,Object> attrs, StringBuilder sql, List<Object> paras)
forModelSave
in class Dialect
public String forModelDeleteById(Table table)
forModelDeleteById
in class Dialect
public void forModelUpdate(Table table, Map<String,Object> attrs, Set<String> modifyFlag, StringBuilder sql, List<Object> paras)
forModelUpdate
in class Dialect
public String forModelFindById(Table table, String columns)
forModelFindById
in class Dialect
public String forDbFindById(String tableName, String[] pKeys)
forDbFindById
in class Dialect
public String forDbDeleteById(String tableName, String[] pKeys)
forDbDeleteById
in class Dialect
public void forDbSave(String tableName, String[] pKeys, Record record, StringBuilder sql, List<Object> paras)
public void forDbUpdate(String tableName, String[] pKeys, Object[] ids, Record record, StringBuilder sql, List<Object> paras)
forDbUpdate
in class Dialect
public String forPaginate(int pageNumber, int pageSize, StringBuilder findSql)
forPaginate
in class Dialect
public boolean isTakeOverDbPaginate()
isTakeOverDbPaginate
in class Dialect
public Page<Record> takeOverDbPaginate(Connection conn, int pageNumber, int pageSize, Boolean isGroupBySql, String totalRowSql, StringBuilder findSql, Object... paras) throws SQLException
takeOverDbPaginate
in class Dialect
SQLException
public boolean isTakeOverModelPaginate()
isTakeOverModelPaginate
in class Dialect
public Page<? extends Model> takeOverModelPaginate(Connection conn, Class<? extends Model> modelClass, int pageNumber, int pageSize, Boolean isGroupBySql, String totalRowSql, StringBuilder findSql, Object... paras) throws Exception
takeOverModelPaginate
in class Dialect
Exception
public final <T> List<T> buildModel(ResultSet rs, Class<? extends Model> modelClass, int pageSize) throws SQLException, InstantiationException, IllegalAccessException
public void fillStatement(PreparedStatement pst, List<Object> paras) throws SQLException
fillStatement
in class Dialect
SQLException
public void fillStatement(PreparedStatement pst, Object... paras) throws SQLException
fillStatement
in class Dialect
SQLException
Copyright © 2018. All rights reserved.