• Start

API Reference

/

Data types

RecordIdRange

The RecordIdRange type targets a range of records within a table in the SurrealDB Kotlin SDK.

RecordIdRange targets a contiguous range of records within a table by their IDs. Pass it to the CRUD builders to operate on a range of records.

Source: surrealdb.kotlin

Import
import com.surrealdb.kotlin.query.RecordIdRange
Method Syntax
RecordIdRange(table, start, end, includeEnd)

Parameter

Type

Default

Description

tableString

The table name.

startString?null

The inclusive start ID, or

null

for unbounded.

endString?null

The end ID, or

null

for unbounded.

includeEndBooleanfalse

Whether the

end

ID is inclusive.

Example
val range = RecordIdRange("person", start = "a", end = "m", includeEnd = true)

client.select(range).awaitAs<List<Person>>()

Was this page helpful?