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
The newest version!
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;
}
// For the SpotBugs warning CT_CONSTRUCTOR_THROW
@Override
protected final void finalize() {}
@Override
public String sql() {
return super.sql() + " LIMIT " + limit;
}
}