Uh oh!
There was an error while loading. Please reload this page.
Add other input types for SQLAlchemy BIT model - #137
Conversation
Co-authored-by: Giacomo rua <giacomo.rua@outlook.com>
ankane
commented
Sep 2, 2025
Hi @jackrua, thanks for the PR. Added support for passing |
Thank you @ankane for the feedback and sorry for the late response. I merged master in my branch and updated my PR, and now the CI passes too. However, I was thinking that now when you read from the DB using the sqlalchemy model, we are returning |
Hi,
First of all, thank you for the great library @ankane!
I'm opening this PR to address some issues that have been raised by users (#84, #110 and #112), that is to input types other than string in the
BITSQLAlchemy model (also when using theasyncpgdialect). In brief with this PR, given:You can add it to your database using whatever input you like (and this will be transformed following the logic already present in the
initof theBitclass):