All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.centit.support.database.jsonmaptable.PostgreSqlJsonObjectDao Maven / Gradle / Ivy

Go to download

数据库操作通用方法和函数,从以前的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);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy