For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: Retrieve zero or one row of data

Return at most one row. When no row matches, value is nil. Decode into an optional type to get the nil.

Examples

With `select()`

let todo: Todo? = try await supabase
  .from("todos")
  .select()
  .eq("id", value: 42)
  .maybeSingle()
  .execute()
  .value