Closed MargaretKrutikova closed 2 years ago
That is not by design. I’m guessing that the metadata query is not returning info on views.
Here it seems like we are fetching tables and columns, but not views, right? https://github.com/JordanMarr/SqlHydra/blob/main/src/SqlHydra.Npgsql/NpgsqlSchemaProvider.fs#L10 Could it be the case that we are just not even fetching views? 🙂
In NpgsqlSchema
in npgsql
they do fetch views separately.
Okay, I understand what you meant. Seems like let sTables = conn.GetSchema("Tables")
doesn't include views, but conn.GetSchema("Views")
will return views on the other hand. However, for views the resulting dataset doesn't have TABLE_TYPE
. Do you think we can fetch views separately and concatenate them with tables while removing TABLE_TYPE
(since we will know which one comes from tables or views)?
Oh that’s perfect! Yes we can pull the views separately and then manually set the table type.
We are using a
postgres
database and it seems likesqlhydra
doesn't generate types for views. Is there anything extra we need to add in the configuration file? Or is it not supported by the library?Thanks!