• Start

Languages

/

Kotlin

/

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)
ParameterTypeDefaultDescription
table StringThe table name.
startString?nullThe inclusive start ID, or null for unbounded.
endString?nullThe end ID, or null for unbounded.
includeEndBooleanfalseWhether 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?