- attached test.py
Issues with MS Access database support.
In testing the use of SQLAlchemy as a way of supporting MS Access and PostgreSQL, I found a few problems in access.py.
- Database reflection failed on my table due to Currency type not being recognised.
- Building SQL statements with functions (eg, func.sum(field_name)) failed due to a missing return statement.
- SQL statements with a JOIN in them were not able to be run, since Access 97 does not support bare 'JOIN' clauses. It only supports INNER JOIN, LEFT (OUTER) JOIN, RIGHT (OUTER) JOIN.
I attach a patch file that addresses all three issues, a test program and database.
The first two fixes are single line fixes and I don't think are controversial.
For the third problem I copied visit_join from compiler.py into access.py and added the INNER keyword. I have no idea if this is the 'right' way to fix this problem or not. My other thought would be to have a flag in access.py that visit_join in compiler.py checks and uses to return the INNER keyword when appropriate.
Cheers,
Rasjid.
Comments (7)
-
Account Deleted -
Account Deleted - attached patch1.mdb
Access database to run against
-
Account Deleted - attached access-sqlalchemy.patch
Patch file
-
repo owner - changed milestone to 0.5.xx
anyone have resources to review this ?
-
- assigned issue to
I do and it's on my radar. I'll give it some attention tonight or tomorrow.
-
Thank you, thank you. Fixed in 3f8914b4b28f309467b96f2903388e69cf8c2b2d. There's still lots of engine related issues in the dialect but these are nice corrections.
-
repo owner - removed milestone
Removing milestone: 0.5.0 (automated comment)
- Log in to comment
Test program illustrating bugs in access.py