-
Notifications
You must be signed in to change notification settings - Fork 150
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
Reflect Via metadata failing #751
Comments
Hmm the I haven't tried but I do think this will be in a better shape for v1.4 as SQLAlchemy 1.4 will support async natively, and we could somehow get that for free. In other words, this won't be fixed in GINO <1.4. As a workaround, I'd suggest using something like |
This was just an illustration of a major underlying problem with the gino API(which I am currently working to fix). Reflect is definitely not the best example to have used, however gino inherits certain classes from SQLAlchemy but because of the difference in API for the connection and engine of both of them, GINO will throw an error, which is as a result of the code itself within GINO and not any users fault. |
Describe the bug
In using gino I tried to use the reflect, but it fails. I speculate this is because it runs as a default sqlalchemy function rather than a gino spinoff, but since it is a gino engine it fails.
To Reproduce
Please provide a self-contained script to reproduce the bug if possible.
result
Now for good measure, I tried a few other alternatives
The result was the same.
I need to e able to retrieve metadata from the database without having prior knowledge of items in it. Things like all the available tables. All the columns in a specified table and so on. Gino does not seem to support these key features. I would have proceeded to do this with sqlalchemy, but seeing that I am already using gino(and gino engine) I cannot because sqlalchemy does not recognize gino engines hence features like reflect, inspect and engine.dialect.get_table_names are not available in gino.
Now there is the option of creating one sqlalchemy engine and one gino engine for the same database but then that seems counterintuitive.
All the fails stem from variation in function names like
connect
instead ofacquire
except fordialect.get_table_name
which is completely unavailableEnvironment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: