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

Fix has_table method #3741

Merged
merged 1 commit into from
Oct 31, 2017
Merged

Fix has_table method #3741

merged 1 commit into from
Oct 31, 2017

Conversation

mxmzdlv
Copy link
Contributor

@mxmzdlv mxmzdlv commented Oct 30, 2017

Dialect's has_table method requires connection as the first argument, not engine (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/interfaces.py#L454).

We can use engine's has_table method instead that handles the connection for us (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/base.py#L2141).

Alternatively, we could call engine.dialect.has_table(engine.connect(), ...).

Dialect's has_table method requires connection as the first argument, not engine (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/interfaces.py#L454). Instead, we can use engine's has_table method that handles the connection for us (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/base.py#L2141). Alternatively, we could call engine.dialect.has_table(engine.connect(), ...).
@coveralls
Copy link

coveralls commented Oct 30, 2017

Coverage Status

Coverage remained the same at 71.271% when pulling 08f07a2 on mxmzdlv:fix/has_table into 200b66d on apache:master.

@mistercrunch mistercrunch merged commit 5bc734b into apache:master Oct 31, 2017
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
Dialect's has_table method requires connection as the first argument, not engine (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/interfaces.py#L454). Instead, we can use engine's has_table method that handles the connection for us (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/base.py#L2141). Alternatively, we could call engine.dialect.has_table(engine.connect(), ...).
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.5 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants