Skip to content

maybe_single throws error on zero rows #1107

Open
@FFX3

Description

@FFX3

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

if the query returns zero rows I'd expect the result to be None not an error otherwise I'd use "single" instead.

To Reproduce

run a query that returns no rows with maybe_single()

    response = (
        supabase.schema('infra')
        .rpc('claim_pdf_job', { "worker_token": worker_token })
        .maybe_single()
        .execute()
    )

Expected behavior

I expect to get a None value

Screenshots

Image

System information

  • OS: NixOS
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-py: 2.13.0
  • Version of Node.js: v22.14.0

Additional context

Issue is mentioned here. #511

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions