Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Support SQLAlchemy syntax for show create table #598

Merged
merged 2 commits into from
Jan 28, 2019
Merged

Support SQLAlchemy syntax for show create table #598

merged 2 commits into from
Jan 28, 2019

Conversation

kuba--
Copy link
Contributor

@kuba-- kuba-- commented Jan 18, 2019

Signed-off-by: kuba-- kuba@sourced.tech
Fixes #594

@kuba--
Copy link
Contributor Author

kuba-- commented Jan 18, 2019

@erizocosmico - maybe we can add the script to integration tests - WDYT?

import pandas as pd
import sqlalchemy

engine = sqlalchemy.create_engine('mysql+pymysql://user:pass@127.0.0.1:3306/test')
with engine.connect() as conn:
    repo_df = pd.read_sql_table("mytable", con=conn)
    for table_name in repo_df.to_dict():
        print(table_name)

@kuba-- kuba-- requested review from erizocosmico and a team January 18, 2019 22:26
@kuba-- kuba-- added the bug Something isn't working label Jan 18, 2019
@ajnavarro
Copy link
Contributor

@kuba-- LGTM.

Could you add to the script that you mentioned to integration tests on this PR to verify that SQLAlchemy is supported?

Also, don't forget to update SUPPORTED.md file

kuba-- added 2 commits January 28, 2019 16:14
Signed-off-by: kuba-- <kuba@sourced.tech>
Signed-off-by: kuba-- <kuba@sourced.tech>
@kuba--
Copy link
Contributor Author

kuba-- commented Jan 28, 2019

@ajnavarro - Added integration test.

@ajnavarro ajnavarro merged commit e6d07a7 into src-d:master Jan 28, 2019
@kuba-- kuba-- deleted the fix-594/show-create-table branch January 28, 2019 20:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants