课程: Supabase Essential Training
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Publishing database changes
- [Instructor] PostgreSQL can automatically publish events happening in the database. Then you can listen to these events anywhere in your application. To publish database events, go to the publication section of the database panel, and now we're going to go to Supabase Realtime. There's insert, update, delete and truncate that are all enabled for publications, but it's not happening on any tables yet. So I'm going to click this zero tables button, and that's going to take me to this list of tables. I'm only going to enable one of the tables, the items table, and I'm doing that because I don't want to enable this for all the tables because that takes a lot of resources. We just want to enable this for the tables that we're interested in. Now I'm going to pull up some code that I have for a webpage where we're going to listen to these database events. I'm using a CDN here to pull in the latest version of Supabase. You may want to use a package manager to pull in a specific version…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。