Database Query Basics with Flutter and Supabase

Поделиться
HTML-код
  • Опубликовано: 18 фев 2023
  • Supabase is a backend-as-a-service that allows you to spin up a serverless Postgres database with APIs in minutes. In this video, we are taking a look at the basics of how you can interact with your Supabase database via the REST API interface.
    👇Links you need:👇
    supabase_flutter package: pub.dev/packages/supabase_flu...
    Supabase quick starter guide for Flutter: supabase.com/docs/guides/gett...
    Official Supabase docs for Flutter: supabase.com/docs/reference/d...
    Today, we're showing you how you can seamlessly interact with your Supabase database using REST API endpoints in your Flutter app.
    One of the reasons developers choose Supabase, is that Supabase simplifies backend development by providing a serverless Postgres database that you can interact with through APIs, speeding up your app development process.
    What you'll learn:
    ✅ Postgres Naming Conventions : get some handy tips on using snake_case for naming elements in your database to avoid complications in SQL queries.
    ✅ Insert Operations: Learn useful techniques for inserting data efficiently-whether a single row or in bulk-and how to leverage default values, particularly using auth.
    uid for automatic user ID insertion.
    ✅ Select Queries: We'll show you some SUPER quick methods to fetch data effectively, customize column selection, and handle related data across tables without direct interaction with join tables.
    ✅ Applying Filters and Modifiers: Make your queries more precise with filters and use modifiers like limit, range, and order to refine results.
    ✅ Data Counting and Aggregation: We'll show you how to count rows and aggregate data, which as you'll know is a MUST for pagination and summarizing information in your applications.
    If you're a developer looking to use Supabase for backend management with a Flutter frontend, you've come to the right tutorial video.
    By the end of this video, you’ll be able to manage database operations WAY EASIER, ensuring robust backend interactions for your applications.
    Don’t forget to subscribe for more practical tutorials on using Supabase with Flutter, and join our community on Discord to connect with other developers!
    💻 Videos to watch next:
    ▶ Watch ALL Supabase & Flutter videos; • Flutter with Supabase
    ▶ Content recommendation app with OpenAI, Supabase, and Flutter: • Content recommendation...
    ▶ Install Google sign-in with Flutter: • How to implement Googl...
    👇 Learn more about Supabase 👇
    🕸 Website: supabase.com/
    🏁 Get started: app.supabase.com/
    📄 Docs: supabase.com/docs
    🔔 Subscribe for more tutorials and feature updates from Supabase: / @supabase
    📱 Connect with Us:
    🐙 Github: www.github.com/supabase
    💬 Discord: www.discord.supabase.com/
    🐦 Twitter: / supabase
    ▶ Instagram (follow for memes): / supabasecom
    ABOUT SUPABASE:
    Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.
    Build in a weekend, scale to millions.
    #Supabase #AppDevelopment #RealtimeApps #DeveloperTools
  • НаукаНаука

Комментарии • 24

  • @kamil_supabase_enjoyer
    @kamil_supabase_enjoyer Год назад +6

    We need more Flutter tutorials!!! This tutorial was mind blowing!!!!! GREAT WORK. 🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳

  • @powertipsweb
    @powertipsweb Год назад +7

    I loved the video, supabase is incredible, I hope many videos like this reach the community and every day there are many more!!!

  • @theGoldyMan
    @theGoldyMan Год назад +3

    I didn't know about maybeSingle. I ended up removing single and checking the result length. Will try that out. Also it wasn't clear when you get a response object or a list of maps. This video helped.

  • @Hawk______
    @Hawk______ Год назад +11

    please increase the frequency for flutter videos

    • @Supabase
      @Supabase  Год назад +1

      Thanks for the huge support!

  • @mohdraziq2668
    @mohdraziq2668 5 месяцев назад

    this content is a BEAST , I say

  • @JuanFcoRomero
    @JuanFcoRomero Год назад +1

    Great content! ❤❤❤❤

  • @yousefyoun2187
    @yousefyoun2187 Год назад +1

    We need more please

  • @roninspect4357
    @roninspect4357 8 месяцев назад

    very helpful

  • @lianglu6037
    @lianglu6037 Год назад +1

    how to setting auth.uid?what use extensions?

  • @seetheworld3839
    @seetheworld3839 Год назад

    Hey there can anyone tell me what type should i use to pass whole supabase row as a parameter in flutter as i cannot see postgresRow but i can see postgresColumn! Thanks it urgent!

  • @kamil_supabase_enjoyer
    @kamil_supabase_enjoyer 10 месяцев назад +1

    I wonder if we can add row level security only for few columns in our table. For example there is a table with user_id inside and I wanna allow owner to change everything except user_id inside this table.

    • @Supabase
      @Supabase  10 месяцев назад +1

      In your particular case, you can set a `user_id = auth.uid()` update policy to enforce that the user cannot change the user_id value.

  • @kausikmr
    @kausikmr 3 месяца назад

    how to get only the rows which are added today

  • @Hawk______
    @Hawk______ Год назад

    also make a video on different auth and error/exception handling with flutter.
    i spend whole day to figure out that the sign in throws exception if credentials are incorrect and have to use a try-catch block to find it.
    In the documentation there is no info on how to handle these exceptions (for a beginner like me(who is developing for the first time) that would be helpful

    • @Supabase
      @Supabase  Год назад +1

      Thanks for the suggestion, and sorry for not making it as straight forward as we could have with the error handling. We will make sure to improve the docs around error handling, and also create a full video on auth!

  • @مبشر
    @مبشر 3 месяца назад

    Great, I wonder if it's possible to utilise others too like count.
    Eg. table(count) gives the number of rows
    Is there a way I can get the sum or avg of a specific column in table using any query like above?

    • @Supabase
      @Supabase  3 месяца назад

      Yup, you can perform aggregate functions with Supabase. Take a look at this blog article: supabase.com/blog/postgrest-aggregate-functions

  • @programingtales7514
    @programingtales7514 Год назад

    Can you please make an explanation about storing the session in the most secure way and how we can increase the security of the database more than login authentication

    • @Supabase
      @Supabase  Год назад +1

      We will create a video on auth with Flutter, but until then you can read this guide on how you can secure your database! supabase.com/docs/guides/auth/row-level-security

  • @sonuaryan5287
    @sonuaryan5287 2 месяца назад

    Supabase sucks at jwt custom authentication when coming to real-time data changes 😔

  • @thomasmabika7291
    @thomasmabika7291 Год назад +1

    Nice video! but how do I delete data automatically? i.e when a profile is deleted, all associated posts should also be deleted.

    • @theGoldyMan
      @theGoldyMan Год назад

      This is done with a constraint. Search cascade delete posrgresql

    • @Supabase
      @Supabase  Год назад +1

      As @Ruby Learner has suggested, you can use the `on delete cascade` keyword to create your tables. This Stack Overflow answer might help! stackoverflow.com/questions/69251891/delete-associated-records-in-supabase