com.scalar.db.storage.jdbc.query.SelectWithLimitQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalardb Show documentation
Show all versions of scalardb Show documentation
A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases
package com.scalar.db.storage.jdbc.query;
import javax.annotation.concurrent.ThreadSafe;
@ThreadSafe
public class SelectWithLimitQuery extends SimpleSelectQuery {
private final int limit;
public SelectWithLimitQuery(Builder builder, int limit) {
super(builder);
assert limit > 0;
this.limit = limit;
}
@Override
public String sql() {
return super.sql() + " LIMIT " + limit;
}
}