Class RecordIdRange
java.lang.Object
com.surrealdb.RecordIdRange
Represents a range of record IDs on a table for range queries (e.g.
select/update/delete/upsert over IDs between a start and an end bound, either
of which may be unbounded).
Use Id.from(long), Id.from(String), or
Id.from(java.util.UUID) for bounds. Pass null for start or
end to make that bound unbounded.
RecordIdRange(String, Id, Id) includes both bounds
(table:start..=end). Use
RecordIdRange(String, Id, boolean, Id, boolean) to exclude either
bound, for example new RecordIdRange("t", a, true, b, false) is
SurrealQL's t:a..b.
-
Constructor Summary
ConstructorsConstructorDescriptionRecordIdRange(String table, Id start, boolean startInclusive, Id end, boolean endInclusive) Creates a range over the given table, choosing whether each bound is inclusive or exclusive.RecordIdRange(String table, Id start, Id end) Creates a range over the given table with optional start and end bounds, both inclusive. -
Method Summary
-
Constructor Details
-
RecordIdRange
-
RecordIdRange
Creates a range over the given table, choosing whether each bound is inclusive or exclusive.- Parameters:
table- table namestart- lower bound, ornullfor unboundedstartInclusive- whether records whose ID equalsstartare includedend- upper bound, ornullfor unboundedendInclusive- whether records whose ID equalsendare included
-
-
Method Details
-
getTable
-
getStart
Lower bound, ornullif unbounded. -
isStartInclusive
public boolean isStartInclusive()Whether the lower bound is inclusive. Meaningless when the range has no lower bound. -
getEnd
Upper bound, ornullif unbounded. -
isEndInclusive
public boolean isEndInclusive()Whether the upper bound is inclusive. Meaningless when the range has no upper bound.
-