com.centit.support.database.jsonmaptable.PostgreSqlJsonObjectDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of centit-database Show documentation
Show all versions of centit-database Show documentation
数据库操作通用方法和函数,从以前的util包中分离出来,并且整合了部分sys-module中的函数
The newest version!
package com.centit.support.database.jsonmaptable;
import com.centit.support.algorithm.NumberBaseOpt;
import com.centit.support.database.metadata.TableInfo;
import com.centit.support.database.utils.DatabaseAccess;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
public class PostgreSqlJsonObjectDao extends GeneralJsonObjectDao {
public PostgreSqlJsonObjectDao() {
}
public PostgreSqlJsonObjectDao(Connection conn) {
super(conn);
}
public PostgreSqlJsonObjectDao(TableInfo tableInfo) {
super(tableInfo);
}
public PostgreSqlJsonObjectDao(Connection conn, TableInfo tableInfo) {
super(conn, tableInfo);
}
// nextval currval
@Override
public Long getSequenceNextValue(final String sequenceName) throws SQLException, IOException {
Object object = DatabaseAccess.getScalarObjectQuery(
getConnect(),
"SELECT nextval('" + sequenceName + "')");
return NumberBaseOpt.castObjectToLong(object);
}
}