com.github.chengyuxing.sql.page.impl.Db2PageHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rabbit-sql Show documentation
Show all versions of rabbit-sql Show documentation
Light wrapper of JDBC, support ddl, dml, query, plsql/procedure/function, transaction and manage sql
file.
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;
}
}