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

    Jan Tennert

    02/01/2023, 7:52 AM
    Yes so you can just use the storage module alone but it works a bit like a plugin system where you can add more plugins to the core module (probably best to read the wiki). But its not like there are extra dependencies because of that. Only dependencies of storage-kt and the core module which has dependencies storage-kt would need anyway
  • l

    legenden

    02/01/2023, 9:01 AM
    Looks great
  • l

    legenden

    02/01/2023, 9:02 AM
    Well done.
  • j

    jaypinho

    02/01/2023, 10:34 AM
    This question is so general / basic I wasn't sure if it belonged in #1006358244786196510 or not (happy to move it if so): I've been using Supabase (and love it!) for months now, but am increasingly unsure what the "point" of PostgREST is. i.e. I understand that at a high level it's an automatically created API for your DB, but my experience has been that I spend a lot of time just mentally translating the syntax from SQL to PostgREST, and invariably I end up trawling thru the PostgREST docs looking for fairly basic SQL features (i.e. group bys, etc.) that it doesn't seem to natively support. If there were an endpoint that simply accepted raw SQL queries and returned results as JSON, wouldn't that be much simpler / more powerful? I'm probably missing something, which is why I'm asking here. 🙂
    s
    • 2
    • 4
  • j

    JamesB

    02/01/2023, 11:08 AM
    Are triggers affected by row-level security?
    s
    • 2
    • 1
  • p

    pocin

    02/01/2023, 11:26 AM
    I have found supabase to be great for trivial crud apps that do not have too much business logic - Saves an enormous amount of time and boilerplate. but once you go beyond the basics and start adding triggers to maintain business logic invariants - ie a closed task cant be edited and all tasks in project cant consume more resources than the project budget) - public views that hide tables in private schema - granular permissions (eg only project owner can mark a project as completed, while a person assigned to the project can update its status to blocked/pending) - in this case you cant use RLS and you have to add the logic to the triggers the verbosity of pl/pgsql really starts to show and it becomes a huge pain to maintain, incredibly tedious to test (using pgtap) and ends up as a big ball of mud. I acknowledge it could be just me, but so far i have not found an elegant and maintainable way to structure my code. is supabase/postgrest doomed to be used for trivial apps, or there is a way to - decouple the business logic into procedures that are easier to unit test - split the codebase into separate files? I have seen using \`\i ./task/triggers.sql \` inside a main
    schema.sql
    but I had hard time making it work because the dependencies can get nonlinear pretty quickly the DX just takes a nosedive after reaching (imo fairly low) amount of complexity, where it just becomes more comfortable to rewrite it using more traditional stack.
  • p

    pocin

    02/01/2023, 11:27 AM
    also naming things (triggers, rls, procedures) is hard! would be great if there was an opinionated framework:)))
  • i

    Imposer

    02/01/2023, 11:55 AM
    i have exceeded my bandwidth usage of supabase to around 4 gb?
  • i

    Imposer

    02/01/2023, 11:55 AM
    i am in my free tier, so will supabase block my account until i pay for it or what is going to happen?
  • s

    silentworks

    02/01/2023, 2:17 PM
    Naming things is hard in general.
  • s

    silentworks

    02/01/2023, 2:20 PM
    As I've mentioned in the thread for @jaypinho's question, you have multiple escape hatches, you can use a direct connection to your Postgres database and do all your business logic in a server side framework of your choice. You can also use edge functions to do all your business logic intensive part of your app and call those where necessary. I think what we are missing is a full featured open source app that makes use of edge functions, postgres functions, rls, triggers to show how one would go about building such an app.
  • p

    pocin

    02/01/2023, 2:56 PM
    > you can use a direction connection to your Postgres database and do all your business logic in a server side framework of your choice yeah, but then supabase becomes a classic hosted postgres provider and does not really add any value > You can also use edge functions hmm, this is interesting. So you would forbid updating the table in question by
    client.from(..).update()
    by revoking access and reimplement everything in the edge function?
  • j

    JoshTheNerd

    02/01/2023, 3:10 PM
    woah I just realized Supabase raised $116m in total
  • j

    JoshTheNerd

    02/01/2023, 3:10 PM
    It doesn't feel like a company that did 😄
  • s

    silentworks

    02/01/2023, 3:23 PM
    To your second question, yes and no. Yes you can block `insert`/`update` using RLS but then you would have to use the service key inside of your edge function or access the database directly but you would need a way to validate the user at this point.
  • s

    Simon Jimenez Tamayo

    02/01/2023, 4:55 PM
    how can I sort a column with the Rest API Url?
  • s

    Simon Jimenez Tamayo

    02/01/2023, 4:56 PM
    I tried with: /rest/v1/Notes?sort=title:asc but it does'nt work
  • g

    garyaustin

    02/01/2023, 5:00 PM
    You asked this in help before here, that was the correct place. Please don't double post questions. Thanks
  • s

    Simon Jimenez Tamayo

    02/01/2023, 5:00 PM
    ok, sorry
  • i

    Imposer

    02/01/2023, 5:03 PM
    can anyone clear this for me please?
  • o

    Olyno

    02/01/2023, 5:18 PM
    If you're in free tier, you should not have to pay anything. If you exceeded the bandwidth, you probably have to upgrade your instance to a paid one (or wait 1 month later to have the usage reset if there is any)
  • i

    Imposer

    02/01/2023, 5:20 PM
    its saying exceeded but i am able to use the storage without any issues
  • j

    JoshTheNerd

    02/01/2023, 6:24 PM
    how do I get a user on the serevr side in nextjs ?
  • s

    silentworks

    02/01/2023, 7:29 PM
    There is a #1006358244786196510 channel to ask this, please don't cross post.
  • v

    Vexoa

    02/02/2023, 12:51 AM
    tbh supabase should store the discord avatar when using the auth for it
  • d

    dubs

    02/02/2023, 1:43 AM
    How long does it usually take to set up a project on supabase?
  • g

    garyaustin

    02/02/2023, 1:50 AM
    Do you mean to get an instance up and running or to set up your project? Less than a minute for the first. No way to answer the second as it totally depends on your project.
  • k

    kyds3k

    02/02/2023, 1:52 AM
    this is weird, Google now acts like I'm trying to RECOVER my account when I use the Supabase authentication to log in
  • k

    kyds3k

    02/02/2023, 1:53 AM
    never did that before. would say "new login" maybe?
  • k

    kyds3k

    02/02/2023, 1:53 AM
    weird
1...343344345...392Latest