In sea-orm, can I create a struct mapped to a sql view?

117 views Asked by At

I have a lot of sql views that I use to display read-only data in a web app. Is there a way to generate the struct types that map to the sql views? I haven't been able to find anything explicitly. One option that I can think of is to create empty tables with the same structure as the corresponding views records, and use sea-orm to generate the code, then change manually the mapping to point to the views. I haven't tried it but it seems painful.

Thanks

0

There are 0 answers