Skip to content

Support any iterable when searching with the postgres adapter - #122

Open
CorinChappy wants to merge 2 commits into
mainfrom
cc-support-iterables-in-postgres-adapter
Open

CorinChappy wants to merge 2 commits into
mainfrom
cc-support-iterables-in-postgres-adapter

Conversation

@CorinChappy

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 30, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IN filters.
  • Simplify async DB pool management and migrate several async fixtures to @pytest.fixture (with asyncio_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.

Comment thread src/logicblocks/event/persistence/postgres/is_multi_valued.py Outdated
Comment thread tests/shared/logicblocks/event/testcases/projection/store/harnesses.py Outdated
@CorinChappy
CorinChappy force-pushed the cc-support-iterables-in-postgres-adapter branch from 5114e41 to 83d3c32 Compare August 4, 2026 13:54
@CorinChappy
CorinChappy force-pushed the cc-support-iterables-in-postgres-adapter branch from 83d3c32 to 04e1c58 Compare September 24, 2026 16:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants