Use this to lock down the schema if you have JSON or JSONB columns

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024
  • НаукаНаука

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

  • @Supabase
    @Supabase  6 месяцев назад +3

    Thanks for tuning in! JSON Schema has an amazing docs that walk you through various examples of how you can use it.
    json-schema.org/learn/getting-started-step-by-step

  • @skrobonja32
    @skrobonja32 6 месяцев назад +6

    Robert Downey Jr. always has killer tips! 💪Great tutorial!

    • @davee8659
      @davee8659 10 дней назад +1

      I see what you did there, but I think Tyler is a much nicer guy (and a hell of a lot smarter) than RDJ. 😂

  • @EmielvanGoor
    @EmielvanGoor 6 месяцев назад +1

    Exactly what I needed, keep the tips coming! Loving Supabase (and PostgreSQL) everyday more and more! Thanks!

    • @dshukertjr
      @dshukertjr 6 месяцев назад

      Thanks for the positive comment! More Postgres content coming on this channel!

  • @luisandrade1291
    @luisandrade1291 6 месяцев назад +12

    Please tell me it has support for your typescript types codegen.

    • @tylershukert3621
      @tylershukert3621 6 месяцев назад +12

      At the moment no, but that is an awesome suggestion! Will pass the feedback to the team.

  • @rembautimes8808
    @rembautimes8808 5 месяцев назад

    Wow - thanks for sharing. Was looking for this video and as I have used RXDB before I can see how it works. Thanks a lot.

  • @ipranay
    @ipranay 6 месяцев назад +4

    This is super helpful!! Any performance concerns with this extension? (esp if you have a large object schema)

    • @Supabase
      @Supabase  6 месяцев назад +1

      Generally you shouldn't notice much difference as the extension is very performant, but of course this depends on a lot of factors. You can find some benchmarks here: github.com/supabase/pg_jsonschema?tab=readme-ov-file#benchmark

  • @mrbjjackson
    @mrbjjackson 5 месяцев назад +1

    Have you any tips for having types in our code when processing jsonb data?

  • @andylee5969
    @andylee5969 6 месяцев назад +2

    Great feature and tutorial :)
    Anyone think it’d be useful to have a tool that can convert these schemas into zod object schemas?

  • @yarapolana
    @yarapolana 6 месяцев назад +2

    Adding types support for the json in the javascript sdk anytime soon?

    • @dshukertjr
      @dshukertjr 6 месяцев назад +1

      That is an excelent idea. We don't yet have type support for the JSON/ JSONB columns from the pg_jsonschema definition, but will pass the feedback to the JS SDK team.

  • @980107105843
    @980107105843 6 месяцев назад +1

    wow you are still updating this series , cute , good luck , i started this whole project through the login profile videos 😆!

    • @dshukertjr
      @dshukertjr 6 месяцев назад +1

      Is it the Flutter video you are talking about? Thanks for handing out in our RUclips channel for such a long time!

    • @980107105843
      @980107105843 6 месяцев назад

      @@dshukertjr Yes its the flutter ones, i think its like 3/6 months ago, idk how much info i can give about this but i am recently creating a private POS , so i went thru ur github pages and look through how u handle errors and handle page transitions, routes etc. Just wanted to let u know was great help :)

  • @kuqmua755
    @kuqmua755 3 месяца назад

    how install it in postgreql inside docker? or is there ready to use docker image with this extension?

  • @williamliu796
    @williamliu796 6 месяцев назад +1

    What is the use case for this? If your schema needs to be strict, isnt it better to create other tables?

    • @dshukertjr
      @dshukertjr 6 месяцев назад +2

      There is no single right or wrong in development. If someone chooses to use JSON or JSONB column, they still might want to restrict what data comes in, as by default JSON and JSONB type columns accept a very wide range of schema. Even a plain string or integers are valid JSON types, so this extension helps the developers to ensure those values do not come in.

  • @AymericRabot
    @AymericRabot 6 месяцев назад +1

    How do you handle evolving schemas? migrations?

    • @Supabase
      @Supabase  6 месяцев назад

      You can simply update the check constraint to match the new schema.

    • @AymericRabot
      @AymericRabot 6 месяцев назад

      @@Supabase how do you handle the existing records and upgrade them to the new schema?

  • @takeshikriang
    @takeshikriang 6 месяцев назад

    Thank you for sharing this.
    As a self-taught developer, I have learned a lot with Supabase.
    Can you create a Postgres tutorial as well?

    • @Supabase
      @Supabase  6 месяцев назад +1

      Thanks for the kind words! What type of content would you like to see in the Postgres tutorial you wish?

    • @takeshikriang
      @takeshikriang 6 месяцев назад

      @@Supabase For example, something related to multi-tenancy in Postgres.
      It is tough to find such quality content.

  • @brotherly9058
    @brotherly9058 15 дней назад

    How about json array?

  • @AmitKapadiaUK
    @AmitKapadiaUK 6 месяцев назад +1

    Great! How do you do this via the dashboard gui?

    • @dshukertjr
      @dshukertjr 6 месяцев назад +1

      Defining JSON schema is currently not supported in the GUI, so you would have to define it from the SQL editor. I will pass the feedback to the frontend team!