mirror of
https://github.com/supabase/supabase.git
synced 2026-07-04 14:34:21 +08:00
32 lines
605 B
Plaintext
32 lines
605 B
Plaintext
---
|
|
id: single
|
|
title: 'single()'
|
|
slug: /single
|
|
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_dart_v1_legacy.yml
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs'
|
|
import TabItem from '@theme/TabItem'
|
|
|
|
Retrieves only one row from the result. Result must be one row (e.g. using limit), otherwise this will result in an error.
|
|
|
|
```dart
|
|
final res = await supabase
|
|
.from('cities')
|
|
.select('name, country_id')
|
|
.single()
|
|
.execute();
|
|
```
|
|
|
|
## Examples
|
|
|
|
### With `select()`
|
|
|
|
```dart
|
|
final res = await supabase
|
|
.from('cities')
|
|
.select('name, country_id')
|
|
.single()
|
|
.execute();
|
|
```
|