getViewColumns function? (similar to getTableColumns)
Hello, in a situation where I need to join a view to a table. Here's the gist of my query code:
This works, however I'd like to be able to select only the view columns. For tables, we have the help of getTableColumns(), which is defined in the source code as:
I couldn't find an equivalent for views. So I tried writing my own
Which is definitely incorrect, but I'm stuck. Any ideas on how one could write a working
This works, however I'd like to be able to select only the view columns. For tables, we have the help of getTableColumns(), which is defined in the source code as:
I couldn't find an equivalent for views. So I tried writing my own
getViewColumns() function. Here's my attempt:Which is definitely incorrect, but I'm stuck. Any ideas on how one could write a working
getViewColumns() function? I'm connecting to a PostgreSQL database, and the view is an existing, regular (non-materialized) view, if it makes a difference.Drizzle ORM | %s
GitHub
TypeScript ORM that feels like writing SQL. Contribute to drizzle-team/drizzle-orm development by creating an account on GitHub.
Drizzle ORM | %s