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

com.ecfront.easybi.dbutils.inner.dialect.OracleDialect Maven / Gradle / Ivy

There is a newer version: 2.8.0
Show newest version
package com.ecfront.easybi.dbutils.inner.dialect;

import sun.reflect.generics.reflectiveObjects.NotImplementedException;

import java.sql.SQLException;
import java.util.Map;

public class OracleDialect implements Dialect {

    @Override
    public String paging(String sql, long pageNumber, long pageSize) throws SQLException {
        return "select * from (select rownum rn , originaltable.* from ("+ sql + ") originaltable  where rownum<=" + (pageNumber * pageSize) + ") where rn > " + (pageNumber - 1) * pageSize;
    }

    @Override
    public String count(String sql) throws SQLException {
        return "select count(1) from ( "+sql+" ) ";
    }

    @Override
    public String createTableIfNotExist(String tableName, Map fields, String pk) throws SQLException {
        throw new NotImplementedException();
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy