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

    jon.m

    10/12/2021, 11:02 PM
    Thank you! Do you know if functions/stored procedures protect against that when done through the dashboard?
    s
    • 2
    • 1
  • u

    user

    10/13/2021, 1:28 AM
    yo! hey, does supabase somehow support custom data types?
  • u

    user

    10/13/2021, 1:28 AM
    i.e.
    Copy code
    create type stat as (
      slug varchar,
      displayName varchar,
      base double precision,
      multipliers double precision
    );
  • u

    user

    10/13/2021, 1:29 AM
    i mean, psql does support it - but is the GUI prepared for that? 🤔 i'm using it quite exhaustively
  • u

    user

    10/13/2021, 1:34 AM
    this is the table I'm trying to achieve:
    Copy code
    base_rep: float8 | rep_multipliers: stat            | base_hp: float8 | hp_multipliers: stat       |
    -----------------+----------------------------------+-----------------+----------------------------+
    1                | [2, source_id, expires_at]       | 100             | [1, source_id, expires_at] |
  • u

    user

    10/13/2021, 1:35 AM
    context: am trying to build a small game using supabase 😄
  • y

    YogurtDrinker

    10/13/2021, 6:41 AM
    Is there a result i could check when there is no more data to be pulled. I'm playing around with using infinite scroll loader i know about the
    range()
    option but i have no idea how to check whether there is additional data
  • k

    khacvy

    10/13/2021, 6:54 AM
    I guess it's not relevant to supabase, it's just the logic how you handle the data. I use supabase with
    useSWRInfinite
    to handle infinite scroll. You can check my code. Hope this help you. https://github.com/trankhacvy/together/blob/8fe069627fba268b658b75c02665b1ef7f0e2da0/src/components/pages/home/Home.tsx#L10
  • y

    YogurtDrinker

    10/13/2021, 6:56 AM
    I'm using something like https://www.npmjs.com/package/react-infinite-scroll-component For sure it's something about the code. I currently have something like
    Copy code
    state = {
            items: null,
            hasMore: true
        }
    
        async fetchData(startIndex, endIndex)
        {
            let { data, error} = await supabaseClient.from("Udemy").select().gt("expirationTime", new Date().toISOString()).range(startIndex, endIndex);
            if (error)
            {
                console.log(error);
                throw error;
            }
            return data;
        }
    
        async fetchMoreData()
        {
            //Get current value in items. Consistently concatenate with 20 
            let newItems = await fetchData(items.length, items.length + 20);
            let concatenateItems = [...this.state.items, newItems]
            this.setState({
                items: concatenateItems
            })
        }
  • y

    YogurtDrinker

    10/13/2021, 6:57 AM
    Still thinking out how to modify the
    hasMore: true
  • y

    YogurtDrinker

    10/13/2021, 6:58 AM
    gonna look at your code to see if i can adapt it 😆 thanks!
  • k

    khacvy

    10/13/2021, 6:59 AM
    I think you can compare the
    count
    value with the current data length to determine
    hasMore
    https://supabase.io/docs/reference/javascript/select
  • y

    YogurtDrinker

    10/13/2021, 7:27 AM
    Oh right that sounds good. The most it could do is one more "wasted" api calls
  • r

    rayyanmaq1

    10/13/2021, 7:51 AM
    https://github.com/supabase/supabase/issues/3504
  • r

    rayyanmaq1

    10/13/2021, 7:52 AM
    How user can recover password if user is authenticate with phone number?
  • o

    Olyno

    10/13/2021, 8:38 AM
    @User @User @User please use the right channel to ask questions/help next time (#843999948717555735)
  • a

    almkamberi

    10/13/2021, 8:39 AM
    Hi there!!!
  • a

    almkamberi

    10/13/2021, 8:39 AM
    First time here
  • y

    YogurtDrinker

    10/13/2021, 8:39 AM
    Ooops ps
  • y

    YogurtDrinker

    10/13/2021, 8:39 AM
    🤢
  • a

    almkamberi

    10/13/2021, 8:39 AM
    can Someone help me with supabase and graphql
  • o

    Olyno

    10/13/2021, 8:55 AM
    Sure, don't hesitate to ask help there -> #843999948717555735 :p
  • a

    almkamberi

    10/13/2021, 9:21 AM
    Thank you!
  • m

    MDobs

    10/13/2021, 10:45 AM
    is there a function to use in order to calculate latency between supabase and my site? or should I just do a
    .now
    until the response is received?
  • h

    Hal

    10/13/2021, 2:10 PM
    I got this error when uploading a 120MB video to storage using supabase js:
    Copy code
    {
      "statusCode": "413",
      "error": "Payload too large",
      "message": "The object exceeded the maximum allowed size"
    }
    but I can't find where to change the limit, somebody help?
  • h

    HarryET

    10/13/2021, 2:12 PM
    Maybe it's a limit imposed by supabase?
  • h

    Hal

    10/13/2021, 2:17 PM
    well it sucks if it is, cause I have to switch to other storage provider and change a lot of things but I hope that is not the case 😅
  • h

    Hal

    10/13/2021, 2:48 PM
    oh it's in the FAQ What is the largest sized file I can deploy to storage? A big cat like a Lion or Siberian tiger, also Ligers are fine. If you are using the hosted platform there is a 50MB limit.
    t
    • 2
    • 1
  • a

    anand

    10/13/2021, 3:13 PM
    do database indexes appear anywhere on the supabase dashboard UI?
  • h

    HarryET

    10/13/2021, 3:13 PM
    @User thx for checking out github chat! hopefully you and the rest of the team enjoy it 😄
1...115116117...392Latest