Repository navigation
Support any iterable when searching with the postgres adapter - #122
Open
CorinChappy wants to merge 2 commits into
Open
CorinChappy wants to merge 2 commits into
CorinChappy wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands Postgres search/filter support to accept non-list iterables (e.g., sets, tuples, iterators) for multi-valued filters, and refactors projection adapter tests to run against both in-memory and Postgres adapters via a shared harness.
Changes:
- Add iterable detection (
is_multi_valued) and adjust Postgres query parameter handling to accept broader iterable inputs. - Refactor projection adapter integration tests to use a harness pattern and add coverage for non-list iterables in
INfilters. - Simplify async DB pool management and migrate several async fixtures to
@pytest.fixture(withasyncio_mode=auto).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/logicblocks/event/projection/store/adapters/test_memory.py | Removes the old unit-case wrapper for the in-memory projection adapter (now covered via harnessed integration tests). |
| tests/shared/logicblocks/event/testsupport/db.py | Updates connection pool lifecycle to use an async context manager. |
| tests/shared/logicblocks/event/testcases/projection/store/harnesses.py | Adds harness abstractions for projection store adapter tests (in-memory + Postgres). |
| tests/integration/logicblocks/event/store/adapters/test_postgres.py | Migrates async fixtures to @pytest.fixture. |
| tests/integration/logicblocks/event/projection/store/adapters/test_postgres.py | Removes older Postgres-only projection adapter case harness. |
| tests/integration/logicblocks/event/projection/store/adapters/test_adapters.py | Refactors to use the new harness fixture and adds non-list-iterable IN filter coverage. |
| tests/integration/logicblocks/event/projection/store/adapters/conftest.py | Introduces parametrized harness fixture wiring and shared Postgres pool setup. |
| tests/integration/logicblocks/event/processing/broker/strategies/distributed/test_broker.py | Migrates async fixtures to @pytest.fixture. |
| tests/integration/logicblocks/event/processing/broker/strategies/distributed/subscriptions/stores/state/test_postgres.py | Migrates async fixtures to @pytest.fixture. |
| tests/integration/logicblocks/event/processing/broker/strategies/distributed/subscribers/stores/state/test_postgres.py | Migrates async fixtures to @pytest.fixture. |
| tests/component/test_processing.py | Migrates async fixtures to @pytest.fixture. |
| tests/component/test_asynchronous_projections.py | Migrates async fixtures to @pytest.fixture. |
| src/logicblocks/event/persistence/postgres/types.py | Broadens parameter typing aliasing for query params. |
| src/logicblocks/event/persistence/postgres/query.py | Adjusts operand/parameter handling to support broader iterable inputs. |
| src/logicblocks/event/persistence/postgres/is_multi_valued.py | Adds helper used to detect multi-valued inputs. |
| src/logicblocks/event/persistence/postgres/converters/helpers.py | Removes the old multi-valued helper in favor of the shared implementation. |
| src/logicblocks/event/persistence/postgres/converters/clause.py | Switches to the shared is_multi_valued helper for filter value handling. |
CorinChappy
force-pushed
the
cc-support-iterables-in-postgres-adapter
branch
from
August 4, 2026 13:54
5114e41 to
83d3c32
Compare
This provides better reporting for assertion errors and IDE support for test running
CorinChappy
force-pushed
the
cc-support-iterables-in-postgres-adapter
branch
from
September 24, 2026 16:23
83d3c32 to
04e1c58
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.