https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • m

    Marky

    08/16/2021, 5:01 PM
    I’m sure I’m doing something wrong but there are no docs
  • j

    jon.m

    08/16/2021, 5:02 PM
    Yeah, I'm using JS client, so I can't help much.
  • m

    Marky

    08/16/2021, 5:03 PM
    They should be fairly similar in how they work.
  • m

    Marky

    08/16/2021, 5:03 PM
    Are you able to do an update without any filters?
  • m

    Marky

    08/16/2021, 5:04 PM
    I think the update in the python client is just broken. Cause there is no match and the other filters don't work either.
  • m

    Marky

    08/16/2021, 5:04 PM
    I don't want to use JS as I like Pandas so much.
  • j

    jon.m

    08/16/2021, 5:57 PM
    Python is in beta is it not? Seems like a reasonable conclusion that you're looking at bugs. But I haven't tried not using filters with JS client.
  • m

    Marky

    08/16/2021, 5:58 PM
    yes, it is in beta, but it is also the #1 used language in the world
  • s

    Scott P

    08/16/2021, 5:59 PM
    Why not make a thread for all these questions, since they're all related to the Python lib? Also 'most used language in the world' varies from different data sources. StackOverflow dev survey 2020 says JS (62.4%) and Python (41.6%), while the TIOBE index says C is ranked top with Python in second place, and yet PYPL says Python is top.
  • m

    Marky

    08/16/2021, 6:00 PM
    I have managed to get it to work with JS, using the obvious syntax of just .update({}) and even with filters. It does seem maybe the python client is buggy or not complete
  • j

    jon.m

    08/16/2021, 6:24 PM
    Python buggy. But any idea on my previous question? 😅
  • m

    Marky

    08/16/2021, 6:25 PM
    Which question?
  • o

    oxile

    08/16/2021, 7:51 PM
    is their any more docs on the python library for updating a row?
  • j

    jon.m

    08/16/2021, 7:52 PM
    @User was dealing with an issue using python update
  • j

    jon.m

    08/16/2021, 7:52 PM
    It appears its buggy as its in beta
  • m

    Marky

    08/16/2021, 7:53 PM
    I don’t think updating actually works. It isn’t listed in docs. It throws errors when used similar to js examples. Match() doesn’t even exist.
  • m

    Marky

    08/16/2021, 7:54 PM
    I managed to get js version working no problem but I want to use Python so I’m stuck with either using rest, Postgres directly, or slugging through js
  • o

    oxile

    08/16/2021, 7:55 PM
    ah okay same wanted to use python but ill just go with js then
  • a

    Adamo

    08/16/2021, 8:00 PM
    Prisma has great documentation imo
  • m

    Marky

    08/16/2021, 8:06 PM
    most things I've worked with do
  • n

    nyellin

    08/16/2021, 8:17 PM
    @User I'm using the python library in production, but we've had to patch the supabase client and gotrue in some places to fix issues. Eventually we'll hopefully get all those changes upstream. Anyway, we update existing records with: client.table(our_table).insert(data, upsert=True).execute()
  • m

    Marky

    08/16/2021, 8:21 PM
    What if you want to update one column for all rows with 0. I've tried
    .insert({"balance": "0"}, upsert=True)
    and I get violate constraints with other columns being null.
  • n

    nyellin

    08/16/2021, 8:23 PM
    We haven't done so. Our clients always write single records
  • o

    oxile

    08/16/2021, 9:38 PM
    ah okay thank you
  • n

    Newt_Dev

    08/16/2021, 10:13 PM
    Thanks. Method#2 worked!
  • n

    Newt_Dev

    08/16/2021, 10:22 PM
    I wrote this article, and hope it would be helpful. https://thomasejembi.hashnode.dev/supabase-password-reset-functionality-with-react
  • u

    user

    08/16/2021, 11:34 PM
    i feel like the docs are helpful for basic data manipulation. But i need help, what is the best way to fetch a user's posts? do i fetch user data , then fetch from posts with the user id?
  • r

    RB_Gaura

    08/16/2021, 11:47 PM
    depends on how you structured your data
  • r

    RB_Gaura

    08/16/2021, 11:48 PM
    I'm assuming (correct me if I'm wrong) that u have a table for ur posts and I assume you have a foreign key in that table that connects to the user's id
  • r

    RB_Gaura

    08/16/2021, 11:49 PM
    you can then do two things
1...787980...392Latest