Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement get_catalog_names #401

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

dungdm93
Copy link
Member

@dungdm93 dungdm93 commented Aug 9, 2023

Description

I'd like to provide standard function get_catalog_names in SQLAlchemy's TrinoDialect.
This function could be used to list and switch between catalogs by client like proposed in Superset SIP-95

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Aug 9, 2023
@@ -192,6 +192,16 @@ def get_foreign_keys(
"""Trino has no support for foreign keys. Returns an empty list."""
return []

def get_catalog_names(self, connection: Connection, **kw) -> List[str]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test added

Signed-off-by: Đặng Minh Dũng <[email protected]>
@hashhar hashhar merged commit f98a608 into trinodb:master Aug 31, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants