ForbesLindesay / atdatabases

TypeScript clients for databases that prevent SQL Injection
https://www.atdatabases.org
MIT License
609 stars 47 forks source link

[pg-schema-cli] Support for generating schema of VIEWs #322

Open dantman opened 8 months ago

dantman commented 8 months ago

I created a view using PostgreSQL's CREATE VIEW that combines multiple tables in a migration. However it appears that when running pg-schema it does not know that the view even exists and no types are generated.

A VIEW behaves very similarly to a TABLE, responding to the same types of SELECT queries (and possibly UPDATE), so it would be quite helpful if the same type of TypeScript interface was generated for a VIEW as is already generated for a TABLE.