mmvergara / supadart

Typesafe queries in Supabase Flutter! Generate Flutter / Dart 🎯 classes from your Supabase schema.
https://supadart.vercel.app
MIT License
36 stars 4 forks source link

Generate model class for view #42

Open bookshiyi opened 1 month ago

bookshiyi commented 1 month ago
CREATE OR REPLACE VIEW orders_views AS
SELECT 
    o.id AS order_id,
    c.name AS buyer_name,
    o.created_at,
    o.created_by
FROM 
    orders o
JOIN 
    contacts c ON o.buyer_id = c.id;

After creating a postgres view, when I tried to use this tool to generate model data, it seemed that the server program crashed and could not return valid data.

mmvergara commented 1 month ago

It's fixed for now, it generates models for views, but it also generates, insert,update, and other methods.