Package tech.ydb.yoj.repository.ydb.yql
Class YqlLimit
java.lang.Object
tech.ydb.yoj.repository.ydb.yql.YqlLimit
- All Implemented Interfaces:
YqlStatementPart<YqlLimit>
Represents a
LIMIT ... [OFFSET ...] clause in a YQL statement.- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionList<? extends YqlStatementPart<?>>static YqlLimitempty()intgetType()booleanisEmpty()static YqlLimitrange(long from, long to) Creates a limit clause to fetch rows in the half-open range[from, to).longsize()static YqlLimittop(long n) Creates a limit clause to fetch topnrows, as if by callingrange(0, n).toString()<T extends tech.ydb.yoj.repository.db.Entity<T>>
StringtoYql(@NonNull tech.ydb.yoj.repository.db.EntitySchema<T> schema) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tech.ydb.yoj.repository.ydb.yql.YqlStatementPart
toFullYql
-
Field Details
-
EMPTY
-
-
Method Details
-
range
Creates a limit clause to fetch rows in the half-open range[from, to).- Parameters:
from- first row index, counting from 0, inclusiveto- last row index, counting from 0, exclusive- Returns:
- limit clause to fetch rows in range
[from, to)
-
top
Creates a limit clause to fetch topnrows, as if by callingrange(0, n).- Parameters:
n- number of rows to fetch- Returns:
- limit clause to fetch top
nrows
-
empty
- Returns:
- limit clause that fetches no rows
- See Also:
-
size
public long size() -
isEmpty
public boolean isEmpty() -
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceYqlStatementPart<YqlLimit>
-
getType
- Specified by:
getTypein interfaceYqlStatementPart<YqlLimit>
-
getYqlPrefix
- Specified by:
getYqlPrefixin interfaceYqlStatementPart<YqlLimit>
-
toYql
public <T extends tech.ydb.yoj.repository.db.Entity<T>> String toYql(@NonNull @NonNull tech.ydb.yoj.repository.db.EntitySchema<T> schema) - Specified by:
toYqlin interfaceYqlStatementPart<YqlLimit>
-
combine
public List<? extends YqlStatementPart<?>> combine(@NonNull @NonNull List<? extends YqlLimit> other) - Specified by:
combinein interfaceYqlStatementPart<YqlLimit>
-
toString
-