julee.repositories.memory.knowledge_service_query ================================================= .. py:module:: julee.repositories.memory.knowledge_service_query .. autoapi-nested-parse:: Memory implementation of KnowledgeServiceQueryRepository. This module provides an in-memory implementation of the KnowledgeServiceQueryRepository protocol that follows the Clean Architecture patterns defined in the Fun-Police Framework. It handles knowledge service query storage in memory dictionaries, ensuring idempotency and proper error handling. The implementation uses Python dictionaries to store knowledge service query data, making it ideal for testing scenarios where external dependencies should be avoided. Attributes ---------- .. autoapisummary:: julee.repositories.memory.knowledge_service_query.logger Classes ------- .. autoapisummary:: julee.repositories.memory.knowledge_service_query.MemoryKnowledgeServiceQueryRepository Module Contents --------------- .. py:class:: MemoryKnowledgeServiceQueryRepository Bases: :py:obj:`julee.domain.repositories.knowledge_service_query.KnowledgeServiceQueryRepository`, :py:obj:`julee.repositories.memory.base.MemoryRepositoryMixin`\ [\ :py:obj:`julee.domain.models.assembly_specification.KnowledgeServiceQuery`\ ] Memory implementation of KnowledgeServiceQueryRepository using Python dictionaries. This implementation stores knowledge service queries in memory: - Queries: Dictionary keyed by query_id containing KnowledgeServiceQuery objects This provides a lightweight, dependency-free option for testing while maintaining the same interface as other implementations. .. py:method:: generate_id() :async: Generate a unique query identifier. :returns: Unique string identifier for a new query .. py:method:: get(query_id) :async: Retrieve a knowledge service query by ID. :param query_id: Unique query identifier :returns: KnowledgeServiceQuery object if found, None otherwise .. py:method:: get_many(query_ids) :async: Retrieve multiple knowledge service queries by ID. :param query_ids: List of unique query identifiers :returns: Dict mapping query_id to KnowledgeServiceQuery (or None if not found) .. py:method:: list_all() :async: List all knowledge service queries. :returns: List of all knowledge service queries, sorted by query_id .. py:method:: save(query) :async: Store or update a knowledge service query. :param query: KnowledgeServiceQuery object to store .. py:attribute:: entity_name :value: 'KnowledgeServiceQuery' .. py:attribute:: logger .. py:attribute:: storage_dict :type: Dict[str, julee.domain.models.assembly_specification.KnowledgeServiceQuery] .. py:data:: logger