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

com.centit.support.database.ddl.H2DDLOperations Maven / Gradle / Ivy

Go to download

数据库操作通用方法和函数,从以前的util包中分离出来,并且整合了部分sys-module中的函数

There is a newer version: 5.3.2302
Show newest version
package com.centit.support.database.ddl;

import com.centit.support.database.utils.QueryUtils;

import java.sql.Connection;

/**
 * 使用H2数据库时请打开MySql兼容模式
 *  jdbc:h2: <url>;MODE=<databaseType>
 *  MODE=MySQL:兼容模式,H2兼容多种数据库,
 *  该值可以为:DB2、Derby、HSQLDB、MSSQLServer、MySQL、Oracle、PostgreSQL
 *
 *  http://www.h2database.com/html/features.html#compatibility
 *
 */
public class H2DDLOperations extends MySqlDDLOperations  {


    public H2DDLOperations(){

    }

    public H2DDLOperations(Connection conn) {
        super(conn);
    }


    @Override
    public String makeCreateSequenceSql(final String sequenceName){
        return "create sequence " + QueryUtils.cleanSqlStatement(sequenceName);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy