Simplify complex SQL queries with Views in Postgres

  Рет қаралды 6,165

Supabase

Supabase

Күн бұрын

Writing raw SQL can be extremely powerful, but queries that are joining tables and aggregating data can quickly increase in complexity. In this video, Jon Meyers steps through refactoring an existing application to query Views instead of Tables, greatly simplifying PostgreSQL queries.
Building an email client with the Next.js App Router and Postgres: • Building an email clie...
00:00 Simplify complex SQL queries with Views in Postgres
01:26 Creating a free Supabase project
03:41 Refactor data fetching logic to use supabase-js
08:55 Create a PostgreSQL view using Supabase AI
12:01 Refactoring a complex query with multiple joins to use Postgres Views
25:47 Perform complex mutations using Postgres Functions and Transactions
📹 Full Next.js Email Client playlist: • Build an Email Client ...
🧑‍💻 GitHub repo: github.com/dijonmusters/nextj...
Introspect PostgreSQL schema and generate TypeScript definitions: • Introspect PostgreSQL ...
💻 Videos to watch next:
▶ Fastest way to host a Postgres database: • FASTEST way to host a ...
▶ Implement Authorization using Row Level Security with Supabase: • Implement Authorizatio...
▶ Generate column values in Postgres with Functions, Triggers, default values and RLS: • Generate column values...
👇 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: github.com/supabase
💬 Discord: 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
@remi-avec-un-i
@remi-avec-un-i 3 ай бұрын
Views are something I already heard of but never saw in action, thanks J
@JonMeyers
@JonMeyers 3 ай бұрын
Yeah, they are very handy for something so simple to create! Glad you enjoyed the video! 🙌
@canergurelsoy6875
@canergurelsoy6875 3 ай бұрын
I'm just loving supabase more and more everyday . Nice job, pls keep bringing it.
@parkerrex
@parkerrex 3 ай бұрын
the videos help a lot
@JonMeyers
@JonMeyers 3 ай бұрын
Glad you enjoyed it! What are you going to build?
@JonMeyers
@JonMeyers 3 ай бұрын
@@parkerrexthanks! 🙌 What would you like to see a video on next?
@dshukertjr
@dshukertjr 3 ай бұрын
I didn't know that `returns()` function on the `select()` call existed! That's very handy!
@JonMeyers
@JonMeyers 3 ай бұрын
Yeah, I only learnt about it while putting this video together! Very handy!
@Speechrezz
@Speechrezz 3 ай бұрын
Really helpful video, thank you! I've started using views in my own Supabase project now and it really simplified my queries!
@VincentFulco
@VincentFulco 3 ай бұрын
Thanks for this example!
@JonMeyers
@JonMeyers 3 ай бұрын
Glad you enjoyed it! Thanks for watching 🙌
@tonyoconnell99
@tonyoconnell99 3 ай бұрын
I really love this tutorial. i learned so much both yourself and lee. i'm going to use it to replace charbot ui 's frontend (but not their supabase backend) so my users can have conversations with different ai models faster. i would really appreciate a link to a github repo of the code you wrote for supabase. i couldn't find your repo anywhere. if needed i will type the code code from the tuturial and still be happy.
@LM43243
@LM43243 3 ай бұрын
As somebody here in the comments mentioned, please do a video on encrypting data! Can't seem to figure out how to do it with next / supabase for my db.
@Laflamablanca969
@Laflamablanca969 3 ай бұрын
You are very enthusiastic… way too enthusiastic lol. Chill bruz
@user-vd3ph6zh8q
@user-vd3ph6zh8q 2 ай бұрын
Is it better to create a client for each function call over exporting a global constant of the client instance? Like `export const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);`
@slavenDj
@slavenDj 3 ай бұрын
Great videos! Is there going to be a video about encryption. Example i have not read anywhere that when i add security label via sql editor to a column it automatically creates trigger and views for decryption
@imho7992
@imho7992 Ай бұрын
Can views also transform POSTGIS geography coordinates back to lat / lng integers?
@hawarhekmat1174
@hawarhekmat1174 3 ай бұрын
Sign in with Google using server action with a client button won't work, when I log the data it gives back a url but in browser won't redirect to Google sign in page but in vscode console when I click on the url it does, maybe it's because of new Google sign in thing.
@twisterrjl
@twisterrjl 3 ай бұрын
Have you also changed the link in supa > auth > url configuration? I sometimes forget to do that
@rohan7011
@rohan7011 3 ай бұрын
Where is the original video link?
@JonMeyers
@JonMeyers 3 ай бұрын
You mean for Lee’s version? Will add it to the description! Thanks for the reminder!
@tonyoconnell99
@tonyoconnell99 3 ай бұрын
@@JonMeyers Here's another reminder. I can't wait to use it. It's such a wonderful example of what Supabase can do. The code and design of the email client's is beautifully simple, and your database is simple and succint. There is nothing faster. Thanks for making this and for teaching me how to do it.
@Alex-bc3xe
@Alex-bc3xe 2 ай бұрын
Hmm I then see no reason to use an ORM cause supabase has pretty easy synthax
@rtorcato
@rtorcato 3 ай бұрын
drizzle has support for views and coming soon foreign table support too, which is great for migrations.. Does Supabase use drizzle?
3 reasons you should use Postgres Functions and Transactions
16:58
The Untold Story of Scott Wu, CEO of Devin AI
21:27
AI Search
Рет қаралды 379 М.
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 34 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 11 МЛН
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 51 МЛН
Is Supabase Legit? Firebase Alternative Breakdown
8:16
Fireship
Рет қаралды 345 М.
Serverless Doesn't Make Sense
10:13
Ben Awad
Рет қаралды 363 М.
8 things you should NEVER do in a Database!
22:56
Supabase
Рет қаралды 9 М.
Build an SQL Agent with Llama 3 | Langchain | Ollama
20:28
TheAILearner
Рет қаралды 2,3 М.
This UI component library is mind-blowing
8:23
Beyond Fireship
Рет қаралды 602 М.
Dependency Injection | Prime Reacts
28:34
ThePrimeTime
Рет қаралды 301 М.
Usage-based restrictions for SaaS subscription tiers
35:28
Supabase
Рет қаралды 6 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 176 М.
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 4,2 МЛН
#miniphone
0:16
Miniphone
Рет қаралды 3,6 МЛН
Cadiz smart lock official account unlocks the aesthetics of returning home
0:30
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 53 МЛН