RecordId identifies a single record by its table and ID, rendered as table:id. Pass it to the CRUD builders to target one record.
Source: surrealdb.kotlin
Import
import com.surrealdb.kotlin.query.RecordIdConstructor
Method Syntax
RecordId(table, id)Parameter | Type | Description |
|---|---|---|
table | String | The table name. |
id | String | The record identifier within the table. |
Example
val ada = RecordId("person", "ada")
client.select(ada).awaitAs<Person>()When bound into a query, a RecordId is rendered with type::record(table, id) so the value is always passed safely.