• Start

API Reference

/

Data types

Table

The Table type refers to a table by name in the SurrealDB Kotlin SDK.

Table refers to a table by name. Pass it to the CRUD builders to target every record in the table.

Source: surrealdb.kotlin

Import
import com.surrealdb.kotlin.query.Table
Method Syntax
Table(name)

Parameter

Type

Description

nameString

The table name.

Example
val person = Table("person")

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

When bound into a query, a Table is rendered with type::table(name) so the value is always passed safely.

Was this page helpful?