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

com.github.chengyuxing.sql.page.impl.Db2PageHelper Maven / Gradle / Ivy

Go to download

Light wrapper of JDBC, support ddl, dml, query, plsql/procedure/function, transaction and manage sql file.

There is a newer version: 9.0.2
Show newest version
package com.github.chengyuxing.sql.page.impl;

import org.jetbrains.annotations.NotNull;

public class Db2PageHelper extends OraclePageHelper {
    @Override
    public @NotNull String pagedSql(char namedParamPrefix, @NotNull String sql) {
        return "select * from (select rownumber() over() as " + ROW_NUM_KEY + ", t.* from (" + sql + ") as t) where " +
                ROW_NUM_KEY + " between " + namedParamPrefix + START_NUM_KEY + " and " + namedParamPrefix + END_NUM_KEY;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy