https://supabase.com/ logo
Join DiscordCommunities
Powered by
# help
  • n

    n

    02/14/2022, 4:26 PM
    I realize this is from a few months back, but did you find a solution to this?
  • h

    Hhorn

    02/14/2022, 6:18 PM
    How do i start a supabase realtime query with operators other than the eq. operator. Usually I query through:
    supabase.client .from('$tableName:id=eq.$documentId')
    . According to the walrus github other operators like gt. would be supported. But I always get an Unhandled Exception: relation "..." does not exist. Would be really nice if anyone could help ๐Ÿ™‚
    g
    • 2
    • 2
  • s

    swiss

    02/14/2022, 7:14 PM
    Hi all, I'm not great with databases and have a db design question. I have a table for tasks, and a table for sessions (in the frontend you can start a timer, and the session has a task id, start time, and stop time). I'd like to have a "total time spent" feature in my frontend, but I'm wondering how to calculate that from my database. Should I create a new property and update it each time the value changes, or is there a special query I can make that will calculate it without much overhead? I feel like the first approach is a bit hacky, but I'm scared that querying the database so many times just to get each tasks "total time spent" is a bit much. Any input/help would be appreciated!
    s
    • 2
    • 26
  • g

    garyaustin

    02/14/2022, 7:33 PM
    Realtime operators
  • f

    Flyken

    02/14/2022, 9:36 PM

    https://i.imgur.com/yZPxBa5.pngโ–พ

    im getting this (sorry for the red box, thought i had the region selection selected
  • h

    Hadi

    02/14/2022, 10:23 PM
    Hi, can someone help me here =) https://github.com/supabase/supabase/discussions/5461#discussion-3876574
  • m

    Michie

    02/15/2022, 12:22 AM
    Hi! With regards to service_role keys, is it safe to add it in Vercel's environment setting? Or it should be stored in another way to make sure it's protected? Thx ๐Ÿ™‚
  • v

    vanderrlay

    02/15/2022, 12:47 AM
    Im trying to hook up a supabase db to google's data studio but having some problems. Has anyone successfully done this? With SSL enabled, they want a client key and certificate along with the server certificate. I know the server certificate is available to download through the supabase db but any idea how to create or get a client key and client certificate?
    j
    m
    • 3
    • 4
  • r

    Rutik

    02/15/2022, 1:06 PM
    I am using google oauth provider and getting this error
    Error 400: redirect_uri_mismatch
    edited with solution: in google cloud console add the url with /auth/v1/callback and it will be fixed
  • m

    malaleche

    02/15/2022, 2:33 PM
    Hi, any hint in how to query based on a column that is a timestamp ?
  • m

    malaleche

    02/15/2022, 2:42 PM
    llooks like this works. const { data, error } = await supabase .from('reminders_scheduled') .update({ flagBlockedBy: threadId }) .eq('flagBlockedBy', '') .lte('sendAt', 'now()')
  • m

    malaleche

    02/15/2022, 3:31 PM
    is there any way to update with a limit(1)
  • m

    malaleche

    02/15/2022, 3:31 PM
    ?
  • k

    Killewolf

    02/15/2022, 3:42 PM
    Hey Bros I wanted to ask something In docs it's written that each project is provided with a dedicated database Does that mean supabase is a single tenant application??
  • c

    carlosloureda

    02/15/2022, 3:43 PM
    Hi everyone. New to supabase and I have a question about users management with this tool. I have read that we cannot access the users in supabase for security reasons and some people duplicate the table to make some features work. My doubt is that I am planning to move a codebase to Supabase and wanted to manage the users with supabase but would love to have our custom built-in admin dashboard. This is being able to see all the users, edit them and or delete them (only from superadmin users in my website). From what I have read on the internet this is not possible? And all the management needs to be done on the Supabase UI dashboard? I am missing something here? Thanks!
  • t

    TremalJack

    02/15/2022, 4:43 PM
    Hello guys, I saw various topics on internet about the "issue" on integrate Supabase oauth on server logic, for example for APIs etc. To help people on that, I made a very simple middleware to handle it. https://github.com/WilliamFalci/supabase-oauth-server-side
  • a

    AmusedGrape

    02/15/2022, 5:11 PM
    does supabase storage have some kind of cache? i deleted a file and reuploaded one with the same name but its still returning the old file
  • t

    TremalJack

    02/15/2022, 5:18 PM
    Check if ur browser have it in cache
  • a

    AmusedGrape

    02/15/2022, 5:18 PM
    not using a browser; this is in a node script
  • t

    TremalJack

    02/15/2022, 5:18 PM
    Uhmm
  • t

    TremalJack

    02/15/2022, 5:19 PM
    await supabase.storage .from('templates') .update( name, fileContents, { contentType: mime.lookup('docx'), cacheControl: '0', upsert: true } )
  • c

    cbecde

    02/15/2022, 5:56 PM
    whats the point of freezing a column?
  • g

    Glockstrap

    02/15/2022, 6:03 PM
    Copy code
    js
    let { data: requests, error } = await supabase.from('requests')
        .select(`
            *,
            status!requests_status_id_fkey (*)
        `)
        .order('created_at', { ascending: false })
        .neq('status.name', 'Archived')
        .eq('user_id', user_id)
    So I'm using this query against the API currently. However, this is still returning requests which are 'archived'. I even tried doing status.id and doing
    .neq(status.id, #)
    and that still returned records with 'Archived'. Am I doing something wrong? I cant find anywhere in the documentation where to filter on relationships, it just appears not to work.
  • g

    Glockstrap

    02/15/2022, 6:10 PM
    interesting enough, this returns a status relationship for records without "Archived", but not for those with 'Archived'
  • g

    garyaustin

    02/15/2022, 6:17 PM
    So what is "not" 'Archived'. Null does not count, it is ignored completely.
  • g

    Glockstrap

    02/15/2022, 6:21 PM
    it's pretty simple.
    requests
    have a
    status_id
    . status table has 4 statuses, each with a unique name, one of them being Archived. There are others like 'Picked Up', 'Completed'. But this filter doesn't seem to do any filtering on requests itself, it instead filters the returned joined status.
  • g

    Glockstrap

    02/15/2022, 6:21 PM
    i can filter on the client side if i need to, but that seems inefficient
  • g

    Glockstrap

    02/15/2022, 6:27 PM
    looks like filtering on a relationship was just added to PostgREST in 9.0.0, so maybe the supabase-js client isn't caught up
  • t

    Thomas van Broekhoven

    02/15/2022, 8:06 PM
    Hi, I am running into a problem with the
    GetPublicUrl()
    method. What happens: 1. I uploaded an image to a bucket. 2. I displayed the image using getPublicUrl(), the correct image showed up. 3. I uploaded a new image (with upsert: true) with the same name, Succesful. 4. I tried to display the new image with getPublicUrl(), but it keeps returning the old image.. The image is updated when I check app.supabase.io, but when I request the public url from there, it gives me a supabase.in url instead of supabase.co. I tried several thing including cache control, but can't figure out why my app keeps displaying the old image. Anyone recognises this or knows what I am doing wrong? Thanks a lot! PS: I see a similar case was reported in this channel 3 hours ago by @User
    g
    • 2
    • 2
  • s

    simongreenuk

    02/15/2022, 9:03 PM
    Good evening all - I'm trying to use Supabase with Nuxt and I'm experiencing a weird error. I'm using the Nuxt
    fetch
    hook to retrieve data (my app is using SSR) and when I first navigate to a page I call
    this.$supabase.auth.user()
    from
    fetch
    and get the user info back but if I refresh the browser
    null
    is then returned, which is causing me a real headache... I can see the user info still in localStorage but I'm not sure why the call to get the user info fails after a reload?
    m
    • 2
    • 5
1...221222223...316Latest