supabase-py icon indicating copy to clipboard operation
supabase-py copied to clipboard

AttributeError: 'SyncRPCFilterRequestBuilder' object has no attribute 'limit'

Open davidwitten opened this issue 4 months ago • 5 comments

Describe the bug A clear and concise description of what the bug is.

The Python client doesn't support limiting rows in an RPC call and fails with "AttributeError: 'SyncRPCFilterRequestBuilder' object has no attribute 'limit'"

To Reproduce Steps to reproduce the behavior:

function_data = supabase.rpc("function", {"param": "a"}).limit(5).execute().data
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> AttributeError: 'SyncRPCFilterRequestBuilder' object has no attribute 'limit'

Expected behavior A clear and concise description of what you expected to happen. Returns a list of the results of "function" limited to 5 rows.

This works in the JS client:

const { data } = await supabase.rpc(fxn, { param: 'a'}).limit(5);

davidwitten avatar Feb 22 '24 19:02 davidwitten