Perform a SELECT query on the table or view.
decode
method, you have to provide a serializable class as the type parameter.Columns
object to select specific columns.The columns to retrieve, defaults to `Columns.ALL`. You can also use `Columns.list`, `Columns.type` or `Columns.raw` to specify the columns.
If true, select will delete the selected data.
Additional configuration & filtering for the request.
val city = supabase.from("cities").select().decodeSingle<City>()
val city = supabase.from("cities").select(columns = Columns.list("id, name")).decodeSingle<City>()
val columns = Columns.raw("""
id,
name,
cities (
id,
name
)
""".trimIndent())
val country = supabase.from("countries")
.select(
columns = columns
)
.decodeSingle<Country>()
val columns = Columns.raw("""
content,
from: sender_id(name),
to: receiver_id(name)
""".trimIndent())
val message = supabase.from("messages")
.select(columns = columns)
.decodeSingle<Message>()
val count = supabase.from("countries")
.select \{
count(Count.EXACT)
\}
.count()!!
val columns = Columns.raw("""
id, name
address->city
""".trimIndent())
val user = supabase.from("users")
.select(columns = columns)
.decodeSingle<User>()