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

✨ Add aioodbc driver support #163

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jakub-lat
Copy link

@jakub-lat jakub-lat commented Jul 27, 2023

Hi, this PR adds support for aioodbc driver. Main goal was to use async with mssql.
It also includes tests (test_mssql/test_aioodbc.py - based on test_aiopg.py) and documentation.
On a side note I updated codecov from 2.1.12 to 2.1.13 in order to run tests, because the former was not available on PyPi.

@zschumacher
Copy link
Owner

thanks for the PR! looks like you just need to run a make fmt

@jakub-lat
Copy link
Author

fixed :)

@zschumacher
Copy link
Owner

hm seems like the bigquery creds are having issues. I'll have to have a look when I have some time.

@zschumacher
Copy link
Owner

taking a look at this today

@zschumacher
Copy link
Owner

zschumacher commented Jul 30, 2023

i just merged #164 this PR which updates the deps and splits the tests out by DBMS. Bigquery issues should be fixed now, but if it fails only on that test, I'm fine merging anyway. Only thing you will need to change once you merge is adding the marker to your test module for the new driver and adding the extra to to the GHA poetry install. Happy to help if you run into issues.

@zschumacher
Copy link
Owner

would you also mind updating the docs for the other db's that aiodbc supports that its available? Just noticed you can specify the driver for different ones. We would probably want to add tests for each in that case as well

@zschumacher zschumacher changed the title Aioodbc driver ✨ Add aioodbc driver support Jul 30, 2023
@jakub-lat
Copy link
Author

Not at all, but I can start working on this in 2 weeks at the earliest, as I'm away from home right now.

@zschumacher
Copy link
Owner

no problem, I can try to help out if I have the time

@zschumacher
Copy link
Owner

just just bumping this - something you think you'll be able to finish up?

@jakub-lat
Copy link
Author

jakub-lat commented Aug 30, 2024

Hi, sorry for the slight delay :)
I synced my fork and added docs/tests for using SQLite with aioodbc. Installing ODBC driver for Oracle is a bit of a pain, and Postgres already has async support with aiopg, so I guess MSSQL and SQLite are enough as examples.

Copy link

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 43.24324% with 21 lines in your changes missing coverage. Please review.

Project coverage is 95.15%. Comparing base (0254931) to head (5646e6b).

Files with missing lines Patch % Lines
pydapper/odbc/aioodbc.py 40.00% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main     #163      +/-   ##
===========================================
- Coverage   100.00%   95.15%   -4.85%     
===========================================
  Files           21       23       +2     
  Lines          582      619      +37     
  Branches       100      109       +9     
===========================================
+ Hits           582      589       +7     
- Misses           0       28      +28     
- Partials         0        2       +2     
Flag Coverage Δ
3.10-bigquery ?
3.10-core ?
3.10-mssql 70.43% <43.24%> (-1.73%) ⬇️
3.10-mysql 69.62% <43.24%> (-1.68%) ⬇️
3.10-oracle ?
3.10-postgresql 83.68% <43.24%> (-2.58%) ⬇️
3.10-sqlite ?
3.11-bigquery ?
3.11-core 84.49% <43.24%> (-2.63%) ⬇️
3.11-mssql 70.43% <43.24%> (-1.73%) ⬇️
3.11-mysql 69.62% <43.24%> (-1.68%) ⬇️
3.11-oracle 70.43% <43.24%> (-1.73%) ⬇️
3.11-postgresql 83.68% <43.24%> (-2.58%) ⬇️
3.11-sqlite ?
3.12-bigquery ?
3.12-core 84.65% <43.24%> (-2.64%) ⬇️
3.12-mssql 70.43% <43.24%> (-1.73%) ⬇️
3.12-mysql 69.62% <43.24%> (-1.68%) ⬇️
3.12-oracle 70.43% <43.24%> (-1.73%) ⬇️
3.12-postgresql 83.84% <43.24%> (-2.59%) ⬇️
3.12-sqlite ?
3.8-bigquery ?
3.8-core ?
3.8-mssql 70.50% <43.24%> (-1.74%) ⬇️
3.8-mysql 69.69% <43.24%> (-1.69%) ⬇️
3.8-oracle ?
3.8-postgresql 83.79% <43.24%> (-2.59%) ⬇️
3.8-sqlite ?
3.9-bigquery ?
3.9-core ?
3.9-mssql 70.50% <43.24%> (-1.74%) ⬇️
3.9-mysql ?
3.9-oracle ?
3.9-postgresql 83.79% <43.24%> (-2.59%) ⬇️
3.9-sqlite ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

3 participants