3 reasons you should use Postgres Functions and Transactions

Поделиться
HTML-код
  • Опубликовано: 4 авг 2024
  • Transactions allow related statements to be grouped together - ensuring every statement succeeds or they all get rolled back. In this video, Jon Meyers shows how to use PostgreSQL Functions to run multiple statements in a Transaction.
    Learn Postgres playlist: • Learn Postgres
    By wrapping the logic to keep the database consistent in a Postgres Function you can improve the security of your application, as the database is responsible for ensuring the data is correct. Additionally, this can improve the performance of your entire system as this Postgres Function only requires a single RPC network request to be invoked, rather than a web application sending each step of the transaction as a separate request.
    📹 Full Next.js Email Client playlist: • Build an Email Client ...
    🧑‍💻 GitHub repo: github.com/dijonmusters/nextj...
    00:00 Why you should use Postgres Functions and Transactions
    00:36 What is a Transaction?
    01:54 Overview of Email Client project
    06:36 Runs multiple statements in a Transaction with Postgres Functions
    11:02 Invoke Postgres Function from JavaScript using supabase-js and RPC
    13:12 Using Cascade Deletes to remove related data from other tables
    16:40 Implement an authorization system in PostgeSQL with Row Level Security policies
    💻 Videos to watch next:
    ▶ Simplify complex SQL queries with Views in Postgres: • Simplify complex SQL q...
    ▶ Fastest way to build a SaaS in 2024 - Next.js, Supabase and Stripe: • Fastest way to build a...
    ▶ Fastest way to get started with Next.js and Supabase in 2024: • FASTEST way to get sta...
    👇 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
  • НаукаНаука

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