Skip to content

Commit 02e4c15

Browse files
docs: document fork changes
1 parent 1b5dbba commit 02e4c15

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,3 +854,14 @@ pip install --group dev
854854
createdb pgvector_example
855855
python3 example.py
856856
```
857+
858+
## Fork Attribution and Changes
859+
860+
This repository is an attributed fork of [pgvector/pgvector-python](https://github.com/pgvector/pgvector-python) by Andrew Kane, licensed under the MIT License. All original copyright notices, license conditions, and upstream attribution are preserved.
861+
862+
### Specific Changes in this Fork
863+
- **SQLAlchemy `BIT` literal binds and object support (`pgvector/sqlalchemy/bit.py`)**:
864+
- Implemented `literal_processor` for `BIT` in SQLAlchemy to support compiling queries with `compile_kwargs={'literal_binds': True}`. Previously, while `VECTOR`, `HALFVEC`, and `SPARSEVEC` implemented `literal_processor`, `BIT` inherited the default from `PGBit` (which returns `None`), causing `sqlalchemy.exc.CompileError: No literal value renderer is available for literal value "'101'" with datatype BIT`.
865+
- Added support in `BIT.process_bind_param` and `BIT.literal_processor` for `pgvector.Bit` instances by converting them to bit string text, allowing `Bit` objects to be passed cleanly across SQLAlchemy queries and expressions.
866+
- Added regression test assertions to `test_literal_binds` in `tests/test_sqlalchemy.py`.
867+

0 commit comments

Comments
 (0)