public class PostgreSqlDialect extends Dialect
Dialect.Holder
keepByteAndShort, modelBuilder, recordBuilder
Constructor and Description |
---|
PostgreSqlDialect() |
Modifier and Type | Method and Description |
---|---|
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) |
String |
forTableBuilderDoBuild(String tableName) |
void |
getModelGeneratedKey(Model<?> model,
PreparedStatement pst,
Table table)
解决 PostgreSql 获取自增主键时 rs.getObject(1) 总是返回第一个字段的值,而非返回了 id 值
issue: https://www.oschina.net/question/2312705_2243354
相对于 Dialect 中的默认实现,仅将 rs.getXxx(1) 改成了 rs.getXxx(pKey)
|
void |
getRecordGeneratedKey(PreparedStatement pst,
Record record,
String[] pKeys)
解决 PostgreSql 获取自增主键时 rs.getObject(1) 总是返回第一个字段的值,而非返回了 id 值
issue: https://www.oschina.net/question/2312705_2243354
相对于 Dialect 中的默认实现,仅将 rs.getXxx(1) 改成了 rs.getXxx(pKey)
|
buildModelList, buildRecordList, fillStatementHandleDateType, fillStatementHandleDateType, getDefaultPrimaryKey, isKeepByteAndShort, isOracle, isPrimaryKey, isTakeOverDbPaginate, isTakeOverModelPaginate, processGeneratedBigIntegerKey, replaceOrderBy, setKeepByteAndShort, setModelBuilder, setRecordBuilder, takeOverDbPaginate, takeOverModelPaginate, 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 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
public void getModelGeneratedKey(Model<?> model, PreparedStatement pst, Table table) throws SQLException
getModelGeneratedKey
in class Dialect
SQLException
public void getRecordGeneratedKey(PreparedStatement pst, Record record, String[] pKeys) throws SQLException
getRecordGeneratedKey
in class Dialect
SQLException
Copyright © 2018. All rights reserved.