Apply Prettier formatting to README and CHANGELOG.
PR Title Check / check-title (pull_request) Successful in 8s
Test Python Package / unit-tests (pull_request) Successful in 15s
Test Python Package / integration-tests (pull_request) Successful in 24s
Code Quality Pipeline / code-quality (pull_request) Successful in 31s
Test Python Package / coverage-report (pull_request) Successful in 12s
PR Title Check / check-title (pull_request) Successful in 8s
Test Python Package / unit-tests (pull_request) Successful in 15s
Test Python Package / integration-tests (pull_request) Successful in 24s
Code Quality Pipeline / code-quality (pull_request) Successful in 31s
Test Python Package / coverage-report (pull_request) Successful in 12s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
b8d8176877
commit
24d5ea14d6
@@ -10,9 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
## [2.2.0] - 2026-07-12
|
||||
|
||||
### Summary
|
||||
|
||||
Add Postgres table adapter with TableRepositoryInterface
|
||||
|
||||
### Changed
|
||||
|
||||
- b37b2e6 Merge pull request '[minor] Add Postgres table adapter with TableRepositoryInterface' (#58) from cursor/postgres-table-adapter into main
|
||||
- 1babb52 Apply ruff formatting to postgres adapter and tests.
|
||||
- 63ee17d Apply prettier formatting to README and CHANGELOG.
|
||||
|
||||
@@ -6,11 +6,11 @@ Subclass an adapter in your own repository to add domain-specific methods while
|
||||
|
||||
## Architecture
|
||||
|
||||
| Layer | Responsibility |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| **Interfaces** | Abstract contracts for connection, context, CRUD, and queues |
|
||||
| Layer | Responsibility |
|
||||
| ---------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| **Interfaces** | Abstract contracts for connection, context, CRUD, and queues |
|
||||
| **Adapters** | Technology-specific base classes (`RedisAdapter`, `MinioAdapter`, `PostgresAdapter`, queue adapters) |
|
||||
| **Your project** | Subclass an adapter and add domain methods |
|
||||
| **Your project** | Subclass an adapter and add domain methods |
|
||||
|
||||
Each public interface is a `@runtime_checkable` `Protocol` with `@abstractmethod` members. **Subclass an adapter** when you need connection management and shared behavior — explicit subclasses get runtime instantiation guards and inherited default methods (e.g. `scan_keys`). **Type-annotate against an interface** when you want loose coupling — any object with the right methods satisfies the contract for mypy and `isinstance()` checks, without inheriting from this package.
|
||||
|
||||
@@ -80,15 +80,15 @@ Requires PostgreSQL 10 or later; tested against PostgreSQL 16 in CI. Tables are
|
||||
|
||||
In-process and disk-backed FIFO queues for buffering dict items. No optional extra required.
|
||||
|
||||
| Adapter | Role |
|
||||
| ------------------------ | -------------------------------------------------------------------- |
|
||||
| `MemoryQueueAdapter` | Thread-safe in-memory buffer with optional dedup and age eviction |
|
||||
| Adapter | Role |
|
||||
| ------------------------ | --------------------------------------------------------------------------------- |
|
||||
| `MemoryQueueAdapter` | Thread-safe in-memory buffer with optional dedup and age eviction |
|
||||
| `FileBackedQueueAdapter` | Mirrors memory to a JSONL file; replays on `connect()`, compacts on dequeue/evict |
|
||||
|
||||
| Environment variable | Description |
|
||||
| ---------------------------- | -------------------------------------------------------- |
|
||||
| `FILE_QUEUE_PATH` | Path to the JSONL queue file |
|
||||
| `FILE_QUEUE_MAX_AGE_HOURS` | Retention window in hours (default: `24`) |
|
||||
| Environment variable | Description |
|
||||
| -------------------------- | ----------------------------------------- |
|
||||
| `FILE_QUEUE_PATH` | Path to the JSONL queue file |
|
||||
| `FILE_QUEUE_MAX_AGE_HOURS` | Retention window in hours (default: `24`) |
|
||||
|
||||
Dedup keys and the age field name are domain-specific: pass them when constructing `FileQueueConfig` (or as kwargs to `FileQueueConfig.from_env(...)`). Callers choose the file path and item schema.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user