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

Use existing database #115

Closed
codeadict opened this issue Apr 27, 2016 · 1 comment
Closed

Use existing database #115

codeadict opened this issue Apr 27, 2016 · 1 comment

Comments

@codeadict
Copy link

Would be great if we can use aiopg sqlalchemy with a legacy database as you can do with sqlalchemy.ext.declarative or sqlalchemy.ext.automap without redefining all the tables again. Im using something like:

screenshot from 2016-04-27 15-27-16

but get an error saying:

AttributeError: 'SAConnection' object has no attribute 'connect'
@asvetlov
Copy link
Member

It's just impossible, sorry.
aiopg.sa utilizes some parts of sqlalchemy thanks to dirty hacks but it's not supposed to reproduce all sqlalchemy's functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants