https://supabase.com/ logo
Join Discord
Powered by
# help
  • j

    jon.m

    08/26/2021, 1:19 AM
    https://supabase.io/docs/reference/javascript/overlaps
  • s

    Scott P

    08/26/2021, 1:32 AM
    At a guess, from the examples, selects/updates/deletes all
    countries
    which have both
    computers
    and
    minerals
    specified in their
    main_exports
    column
  • j

    jon.m

    08/26/2021, 1:33 AM
    oh, that makes plenty of sense
  • j

    jon.m

    08/26/2021, 1:34 AM
    i was thinking it was a match on an array as a field
  • j

    jon.m

    08/26/2021, 1:42 AM
    So I have a tags array field on my posts table, i.e,. "food", "recipe", etc. And I need a way to select posts that match a provided array of tags. Anyone know of the api to do that? I'm not seeing anything similar in the docs.
  • j

    jason-lynx

    08/26/2021, 2:16 AM
    when you mean 'match', do you mean an exact match, or just having one array a subset of the other?
  • j

    jason-lynx

    08/26/2021, 2:16 AM
    i think
    .contains
    or
    .containedBy
    might be what you need, depending on which direction the subsetting should be
  • j

    jon.m

    08/26/2021, 2:36 AM
    I'll be looking for a subset So ["apples", "oranges"] Would return anything that contained both or one of those.
  • j

    jason-lynx

    08/26/2021, 2:55 AM
    if
    ['apples', 'oranges']
    is your provided array, then https://supabase.io/docs/reference/javascript/containedby might do it?
    Copy code
    const { data, error } = await supabase
      .from('posts')
      .select()
      .containedBy('post_tags', ['apples', 'oranges'])
    which gives posts that only have 'apples' and/or 'oranges' as a tag
  • j

    jon.m

    08/26/2021, 3:33 AM
    I tried that and it was throwing an error but I’ll try again
  • j

    jon.m

    08/26/2021, 3:33 AM
    Thanks for the insight
  • j

    jon.m

    08/26/2021, 4:02 AM
    it works, you saved the whole week @User
  • d

    doctorRuediger

    08/26/2021, 7:01 AM
    I can enter data in the database but when a new user wants to register I get a 403. What can be the reason?
  • b

    binajmen

    08/26/2021, 8:08 AM
    Does it make sense to add a GraphQL layer on top of Supabase? I mean, it seems deep relationships are handled pretty well:
    Copy code
    js
    const { data, error } = await supabase
      .from('countries')
      .select(`
        name,
        cities (
          name
        )
      `)
  • l

    LuddensEkko

    08/26/2021, 8:16 AM
    could be because u didnt enable email-signup
  • p

    Poypoypoy

    08/26/2021, 9:12 AM
    anyone deploy supabase in aws???
  • p

    Poypoypoy

    08/26/2021, 9:16 AM
    this one aws issue? about my env. secret
  • d

    doctorRuediger

    08/26/2021, 1:03 PM
    right. i am a idiot. thx
  • d

    dennis

    08/26/2021, 1:44 PM
    I would deeply appreciate if someone helps me setting up the Twitter API with my supabase application (see https://github.com/supabase/supabase/discussions/2961). Would also pay for the time!
  • a

    Azura

    08/26/2021, 1:57 PM
    How do I add list of uuid to supabase sql column?
  • a

    Azura

    08/26/2021, 1:58 PM
    [{uuid_1}, {uuid2}, ...] doesn't work for me
  • j

    Julián

    08/26/2021, 2:09 PM
    @Azura, the column type is uuid[] ?
  • m

    Mike92988

    08/26/2021, 2:18 PM
    Hey guys, was wondering if anyone has had any luck with pushing data to an array using the supabase library on a node server, does anyone know how this would work?
  • a

    Azura

    08/26/2021, 2:20 PM
    Yeah
  • s

    s u s h i

    08/26/2021, 2:39 PM
    hi im trying to create a policy where a role "Admin" can update the profiles table I tried it using the UI in supabase, and added, profiles.role_id = 1 in the USING expression and left the WITH CHECK EXPRESSION BLANK. but it still doesnt let me update in the frontend. :/
  • s

    s u s h i

    08/26/2021, 2:43 PM
    I turned RLS off for now
  • k

    kennethcassel

    08/26/2021, 2:54 PM
    Is there a way to restrict the size and/or amount of images a user can upload to Supabase storage?
  • s

    silentworks

    08/26/2021, 2:56 PM
    You probably can by creating a function and trigger that checks the
    storage.objects
    table before insert, I haven't tested this myself but it should be possible.
  • k

    kennethcassel

    08/26/2021, 2:58 PM
    sweet, we had a similar high level idea 🙂 We want to prevent malicious users from uploading too many images
  • s

    silentworks

    08/26/2021, 3:00 PM
    Or you can allocate uploading to the server side and do the check before the upload starts. I need to check with the Supabase Team about the storage upload lifecycle because I'm not sure if the insert into the
    storage.objects
    table happen before the upload is completed or after.
1...636465...316Latest