julee.repositories.minio.knowledge_service_query¶
Minio implementation of KnowledgeServiceQueryRepository.
This module provides a Minio-based implementation of the KnowledgeServiceQueryRepository protocol that follows the Clean Architecture patterns defined in the Fun-Police Framework. It handles knowledge service query storage as JSON objects in Minio, ensuring idempotency and proper error handling.
The implementation stores knowledge service queries as JSON objects in Minio, following the large payload handling pattern from the architectural guidelines. Each query is stored as a separate object with the query ID as the key.
Attributes¶
Classes¶
Minio implementation of KnowledgeServiceQueryRepository. |
Module Contents¶
- class julee.repositories.minio.knowledge_service_query.MinioKnowledgeServiceQueryRepository(client)[source]¶
Bases:
julee.domain.repositories.knowledge_service_query.KnowledgeServiceQueryRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of KnowledgeServiceQueryRepository.
This implementation stores knowledge service queries as JSON objects in Minio buckets, following the established patterns for Minio repositories in this system. Each query is stored as a separate object with deterministic naming.
- async generate_id()[source]¶
Generate a unique query identifier.
- Returns:
Unique string identifier for a new query
- Return type:
str
- async get(query_id)[source]¶
Retrieve a knowledge service query by ID.
- Parameters:
query_id (str) – Unique query identifier
- Returns:
KnowledgeServiceQuery object if found, None otherwise
- Return type:
julee.domain.models.assembly_specification.KnowledgeServiceQuery | None
- async get_many(query_ids)[source]¶
Retrieve multiple knowledge service queries by ID.
- Parameters:
query_ids (list[str]) – List of unique query identifiers
- Returns:
Dict mapping query_id to KnowledgeServiceQuery (or None if not found)
- Return type:
dict[str, julee.domain.models.assembly_specification.KnowledgeServiceQuery | None]
- async list_all()[source]¶
List all knowledge service queries.
- Returns:
List of all knowledge service queries, sorted by query_id
- Return type:
list[julee.domain.models.assembly_specification.KnowledgeServiceQuery]
- async save(query)[source]¶
Store or update a knowledge service query.
- Parameters:
query (julee.domain.models.assembly_specification.KnowledgeServiceQuery) – KnowledgeServiceQuery object to store