-
Notifications
You must be signed in to change notification settings - Fork 42
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
Other MySQL dialects (aside MySQLdb) are not supported #13
Comments
+1. It would be great to have cruzdb support python3. I will work on this at some point. Meanwhile, any pull request would be appreciated. The Genome.url holds the template for the url. so that can be changed without modifying the code. Then we'd have to adjust create_url to do more careful checking (instead of just mysql:// prefix). |
The only problem is handling all the combinations that SQLAlchemy supports, IMO. |
Can just take an extra argument, eg dialect="oursql". with the Genome.url as: url = "mysql+%(dialect)://%(user)s%(password)s@%(host)s/%(db)s" and adjust the matching which is currently: if db.startswith(("sqlite://", "mysql://", "postgresql://")): to use a regexp for all 3 like "^(sqlite|mysql|postgresql)(+[^:]+)://" # untested |
I'll try to get a PR done, thanks for the suggestions. |
cruzdb hardcodes mysql:// urls in its initialization, therefore any other MySQL dialects different from MySQLdb aren't supported even though SQLalchemy handles them fine.
Related to this is that the
engine
parameter forGenome
is not used at all.Removing this hardcoded limitation would ease a Python 3 port / support (given that both SQLSoup and SQLalchemy support Python 3).
The text was updated successfully, but these errors were encountered: