Data Realtime V2 (beta)


This function is currently in Beta however should be fine for you to test it out with smaller lists and tables.

With 2.15.0 the plugin now offers a new and more efficient data handling using Supabase Realtime only. There's two new settings to check:

  • Data Realtime V2 (Beta): a simple boolean to enable the new system. If you leave it as false, the plugin just works as before and the Primary Key is not necessary.

  • Primary Key: This is needed for the new system to properly work, when handling Update and Delete events. If you've enabled the new system but left this empty, the plugin will uses the old system instead, since leaving this empty would break it.

Under the Hood

The new system essentially uses the payload of the Realtime messages to manipulate the initial query and re-parse the updated data. With Every Insert, Update and Delete we get the Old and New data sent to us via the Websockets. The Bubble event "Database change happened" will fire everytime still. So what happens at each action:

  • UPDATE: We find the relevant entry based on the Primary Key, update it based on the New data, and parse it back to Bubble objects.

  • DELETE: We find the relevant entry based on the Primary Key, delete the entry and parse the response back to Bubble objects.

  • INSERT: The Plugin will attempt to insert the entry based on your initial sorting and query at the right position, if it cannot it will add it to the bottom of the list.

Last updated