Show Presto views as views, not tables (#8243)

* WIP

* Implement views in Presto

* Clean up

* Fix CSS

* Fix unit tests

* Add types to database

* Fix circular import
This commit is contained in:
Beto Dealmeida
2019-09-18 12:47:10 -07:00
committed by GitHub
parent 4088a84eb4
commit 12fb8e70cc
9 changed files with 77 additions and 17 deletions

View File

@@ -1063,7 +1063,7 @@ class Database(Model, AuditMixinNullable, ImportMixin):
"""
try:
tables = self.db_engine_spec.get_table_names(
inspector=self.inspector, schema=schema
database=self, inspector=self.inspector, schema=schema
)
return [
utils.DatasourceName(table=table, schema=schema) for table in tables
@@ -1097,7 +1097,7 @@ class Database(Model, AuditMixinNullable, ImportMixin):
"""
try:
views = self.db_engine_spec.get_view_names(
inspector=self.inspector, schema=schema
database=self, inspector=self.inspector, schema=schema
)
return [utils.DatasourceName(table=view, schema=schema) for view in views]
except Exception as e: