public class PostgresqlDialect extends AnsiDialect
jdbcProperties, namedParameterJdbcTemplate, wrapper
Constructor and Description |
---|
PostgresqlDialect(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate,
JdbcProperties jdbcProperties) |
Modifier and Type | Method and Description |
---|---|
PostgresqlDialect |
clone() |
Dialect |
cloneDialect()
克隆方言
|
DialectNameEnum |
dialectName()
方言名
|
String |
getPageJoinSql()
获得用于SQL字符串拼接的SQL分页字符串
|
Long |
insertOrUpdate(String tableName,
com.alibaba.fastjson.JSONObject paramJson,
String[] conditions,
DbUpdateEnum dBUpdateEnum)
插入或更新
表中必须存在数据唯一性约束
|
page, pageSql, pageSql, pageWhere, toPage
aopAfter, aopAfter, aopAfter, aopBefore, aopBefore, audit, extractTables, getDataSource, getDeleteWhereSql, getJdbcProperties, getJdbcTemplate, getNamedParameterJdbcTemplate, getRowMapper, isDataSize, isUpdateAndExpectedEqual, isUpdateAndExpectedGreaterThanEqual, listResultToGetResult, paramFormat, paramToWhereSql, paramToWhereSql, paramValidate, paramValidate, paramValidate, paramValidate, paramValidate, paramValidate, paramValidate, paramValidate, queryForJson, queryForList, queryForList, queryForObject, queryForRowSet, resultToJson, resultToObject, setDataSource, updateAndExpectedEqual, updateAndExpectedGreaterThanEqual, updateBatchAndExpectedEqual
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getJdbcProperties, getNamedParameterJdbcTemplate, getWrapper, setJdbcProperties, setNamedParameterJdbcTemplate, setWrapper
public PostgresqlDialect(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcProperties jdbcProperties)
public Dialect cloneDialect()
Dialect
cloneDialect
in interface Dialect
cloneDialect
in class AnsiDialect
public PostgresqlDialect clone()
clone
in class AnsiDialect
public DialectNameEnum dialectName()
Dialect
dialectName
in interface Dialect
dialectName
in class AnsiDialect
public String getPageJoinSql()
AnsiDialect
默认实现MySQL标准,如:
getPageJoinSql
in interface Dialect
getPageJoinSql
in class AnsiDialect
public Long insertOrUpdate(String tableName, com.alibaba.fastjson.JSONObject paramJson, String[] conditions, DbUpdateEnum dBUpdateEnum)
Dialect
更新触发条件:此数据若存在唯一性约束则更新,否则便执行插入数据
MySQL执行示例:
INSERT INTO table (param1, param2, ...)
VALUES
(:param1, :param2, ...)
ON DUPLICATE KEY UPDATE
condition = condition + :condition, ...
insertOrUpdate
in interface Dialect
insertOrUpdate
in class AnsiDialect
tableName
- 表名paramJson
- 插入或更新所用到的参数conditions
- 更新条件(对应paramJson内的key值)dBUpdateEnum
- 更新类型 DbUpdateEnumCopyright © 2022 Pivotal Software, Inc.. All rights reserved.