Open bookshiyi opened 3 months ago
This is really useful for common operations!
althought this is assuming that every table primary key will be id
(which is mostlikely by default).
but the list()
fn is very doable.
references: https://pub.dev/packages/swagger_parser https://pub.dev/packages/swagger_dart_code_generator
Hi so, i don't quite understand why is this relevant? it it related about the queries? sorry im just really new to dart and swagger. i just did this project on a whim lol.
Morning~
I am also a beginner for swagger, but these project has provide the generation of get(), post(), delete(), patch() functions according to swagger.paths
fields.
Maybe we could reference them to do these:
view
(or generate all functions according to permissions which defined in swagger.paths
) #42 gen_random_uuid()
, now()
, auth.uid()
etcI forgot to respond to this, I see where your going with this. assuming we got to generate those 3, could you give me an example on how each of them would look like generated? again sorry for my slow comprehension
hi, @mmvergara, Sorry, I missed your email too.
I didn't think too well about how we should achieve it.
On the other hand, these two projects are not based on supabase sdk, so we may also have some modifications.
These two projects, which have existed for a relatively long time, may have great inspiration for our projects, not just the three aspects mentioned above.
I see, Noted, will explore this further.
When I use this project to create classes, it is very nice. but then I also need to write a lot of operation classes of each model classes.
So, generate a
class Repository<T extends SupadartClass<T>>
that works for all model classes is possible?like this(at present, due to syntax restrictions, this code does not work):
Usage:
If others are facing a similar situation, welcome to share any experience or any ideas.