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

    madx

    02/08/2022, 9:28 AM
    @User I think the % might be an issue as per the Postgrest docs: https://postgrest.org/en/stable/api.html#operators
  • z

    zander

    02/08/2022, 9:30 AM
    I did notice that earlier this morning, but for the title that uses
    ilike
    , everything works as expected with
    %
    . I added the
    tags
    part today and now it is broken
  • z

    zander

    02/08/2022, 9:33 AM
    I did replace the
    %
    with
    *
    and got a similar error:
    Copy code
    json
    {
        "reason": "Problem fetching feed",
        "error": "\"failed to parse logic tree ((title.ilike.*reading*,tags.cs{reading}))\" (line 1, column 43)"
    }
  • m

    madx

    02/08/2022, 9:45 AM
    I can't seem to find a reason for it not to work 😦
  • a

    anan7

    02/08/2022, 9:51 AM
    Hey guys, Is it possible to pass both email and phone number during sign up and the user verify both?
  • c

    CognusBoi

    02/08/2022, 10:06 AM
    @User are you sure the syntax is correct? shouldn't the
    or
    query be of the form
    title.ilike.%${searchTerm}%,tags.cs[${searchTerm}]
    ?
  • c

    CognusBoi

    02/08/2022, 10:08 AM
    (replace the curly brackets with square brackets maybe? sounds trivial but might work)
  • m

    madx

    02/08/2022, 10:36 AM
    @User the postgrest docs use curly braces but eh, might be worth giving it a shot 🤷‍♂️
  • z

    zander

    02/08/2022, 11:23 AM
    @User no luck trying square brackets.
  • x

    xtreding

    02/08/2022, 12:25 PM
    Hi guys! Do anyone face with the error like:
    pq: bind message supplies 2 parameters, but prepared statement \“\” requires 25" (error)
    ? The statement is selecting all columns with types:
    Copy code
    SELECT
        pg_attribute.attname AS name,
        pg_catalog.format_type(pg_attribute.atttypid,pg_attribute.atttypmod) AS column_type
    FROM pg_attribute
             JOIN pg_class ON pg_class.oid = pg_attribute.attrelid
             LEFT JOIN pg_attrdef pg_attrdef ON pg_attrdef.adrelid = pg_class.oid AND pg_attrdef.adnum = pg_attribute.attnum
             LEFT JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace
             LEFT JOIN pg_constraint ON pg_constraint.conrelid = pg_class.oid AND pg_attribute.attnum = ANY (pg_constraint.conkey)
    WHERE pg_class.relkind = 'r'::char
      AND  pg_namespace.nspname = $1
      AND pg_class.relname = $2
      AND pg_attribute.attnum > 0
    Statement is used in golang Postgres driver (github.com/lib/pq) Query call looks like:
    db.QueryContext(p.ctx, tableSchemaQuery, "myschema", "mytable")
    where tableSchemaQuery is the above query
  • x

    xtreding

    02/08/2022, 12:26 PM
    DB is supabase postgres
  • m

    Morza (Chris)

    02/08/2022, 12:31 PM
    Hey guys, are there any docs on inserting and updating many-to-many relationships?
    g
    • 2
    • 5
  • s

    simpautus

    02/08/2022, 1:32 PM
    Hi! Trying to get a proper user photo from Facebook login but since the profileURL in GoTrue is hard coded to
    /me?fields=email,first_name,last_name,name,picture
    it returns (default?) 50x50 url only. If I was able to alter the request URL to
    me?fields=email,first_name,last_name,name,picture.width(1000)
    it would return picture url to the nearest dimension to 1000px and so on. The default 50x50 is useless in my case. There's probably many other needs to tweak the request especially with wider permission scopes. Am I missing something or is there a workaround for this? While we're at it I'd also need separate firstname and lastname. They're also provided by Facebook but joined together as
    name
    by GoTrue.
  • z

    zander

    02/08/2022, 1:48 PM
    I would also like to know the answer to this question
  • m

    Morza (Chris)

    02/08/2022, 2:03 PM
    If you find the answer can you let me know? I'm surprised there's no much out there considering it's built on a relationalDB
  • z

    zander

    02/08/2022, 2:12 PM
    sure, but I've been searching on and off for a while. I'm very new to databases so this stuff is very alien. What I did find out is that a join or junction table is probably needed, but that was where I got lost.. need to revisit it at some point
  • m

    Morza (Chris)

    02/08/2022, 2:16 PM
    Join tables are just 2 tables that have an id of the respective rows. Ex: a user liking posts So the table would be something like user_likes [post.id, user.id] Or user.languages would be [user.id, language.id]
  • m

    Morza (Chris)

    02/08/2022, 2:18 PM
    So we'd typically have to make a language and then associate it to the user. But I'm not sure if there's a clean way besides doing multiple db calls
  • g

    garyaustin

    02/08/2022, 2:39 PM
    Updating many to many relationships
  • g

    garyaustin

    02/08/2022, 4:39 PM
    or with contains
  • z

    zander

    02/08/2022, 5:19 PM
    @User @User I solved my issue thanks to @User's help. To search for a value in an array we can use the
    cs
    operator like so:
    tags.cs.{${searchTerm}}
    . The difference was that I missed a
    .
    before the opening curly brace. Of course it has that info in the docs and I missed it! 🤦‍♂️ Thanks for all your help
  • m

    madx

    02/08/2022, 5:19 PM
    Oh wow nice catch! Totally missed it as well!
  • j

    Jim

    02/08/2022, 5:44 PM
    Hey all, pretty new to supabase. I've made a scraper which adds info into a database, and now I would like for browsers to read this data. I havent yet set RLS, I want browsers to be able to read but not write (easy enough theres a template for that) but how would I allow my scraper function to access the database for insert?
    s
    z
    • 3
    • 6
  • g

    gleki

    02/08/2022, 5:46 PM
    Did you succeed?
  • t

    tricked

    02/08/2022, 5:48 PM
    nope
  • i

    itsnotyalc

    02/08/2022, 5:53 PM
    I have a simple 1:1 chat app. I have the following tables:
    channel_users
    ,
    channels
    ,
    messages
    , and
    users
    . I want to get all channels based on the user id (from
    channel_users
    ). Any ideas on how to construct that using Supabase?
    g
    • 2
    • 1
  • t

    Taner Nill

    02/08/2022, 6:25 PM
    Hi all. I am using supabase ui and can't find where I can change text from lowercase to uppercase... it is somewhere in the internals of the auth component...
  • t

    Taner Nill

    02/08/2022, 6:26 PM
    any suggestions how to change?
  • t

    Taner Nill

    02/08/2022, 6:27 PM
    I use
    import { Auth } from '@supabase/ui';
  • k

    king_k_rab

    02/08/2022, 7:46 PM
    Just a basic question regarding `.auth.onAuthStateChange()`: I'm having what seems to be a classic react timing problem with the session & the logged in user. My question is simple, when
    .auth.session() === Session
    (not
    null
    ), does that trigger
    .auth.onAuthStateChange()
    ? Or is that only for login/signup/logout/password recovery, etc etc...
    s
    • 2
    • 3
1...216217218...316Latest