From ccec09fe72e71c28ea5d44681e6330e2aafd2e10 Mon Sep 17 00:00:00 2001 From: Ollie Halliday <22655069+Hallidayo@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:33:59 +0000 Subject: [PATCH] dart update codeblocks showing --- spec/supabase_dart_v0.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/supabase_dart_v0.yml b/spec/supabase_dart_v0.yml index 73f1ed2c9fd..9248299d3ce 100644 --- a/spec/supabase_dart_v0.yml +++ b/spec/supabase_dart_v0.yml @@ -539,15 +539,16 @@ functions: ``` - id: update - title: 'Modify data: update()' description: | Performs an UPDATE on the table. + title: 'Modify data: update()' notes: | - `update()` should always be combined with [Filters](/docs/reference/dart/using-filters) to target the item(s) you wish to update. examples: - - name: Updating your data + - id: updating-your-data + name: Updating your data isSpotlight: true - dart: | + code: | ```dart final res = await supabase .from('cities') @@ -555,13 +556,14 @@ functions: .match({ 'name': 'Auckland' }) .execute(); ``` - - name: Updating JSON data + - id: updating-json-data + name: Updating JSON data description: | Postgres offers a [number of operators](https://www.postgresql.org/docs/current/functions-json.html) for working with JSON data. Right now it is only possible to update an entire JSON document, but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys. - dart: | + code: | ```dart final res = await supabase .from('users')