sietecero
DTDrizzle Team
•Created by sietecero on 9/6/2023 in #help
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
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.8 replies