memory_collection_dao
Memory collection data access object (DAO)
Attributes
Classes
MemoryCollectionDao
Bases: BaseDao
Memory collection data access object (DAO)
Attributes
Functions
get_by_name
get_by_name(
name: str,
filter_deleted: bool = True,
filter_disabled: bool = True,
) -> Optional[MemoryCollection]
get_by_namespace_pkid
get_by_namespace_pkid(
namespace_pkid: str,
include_deleted: bool = False,
include_disabled: bool = False,
) -> List[MemoryCollection]
Retrieve a list of MemoryCollection objects filtered by namespace primary key ID.
Parameters:
-
namespace_pkid
(str
) –The primary key ID of the namespace to filter by.
-
filter_deleted
(bool
) –If True, exclude collections marked as deleted. Defaults to True.
-
filter_disabled
(bool
) –If True, exclude collections marked as disabled. Defaults to True.
Returns: List[MemoryCollection]: A list of MemoryCollection objects that match the specified filters.
get_in_namespace
get_in_namespace(
*,
namespace_key: str,
resource_key: str,
include_deleted: bool = True,
include_disabled: bool = True
) -> MemoryCollection | None
Retrieve an MemoryCollection
in a specified namespace by its primary key ID or name.
Parameters:
-
namespace_key
(str
) –The primary key ID of the namespace.
-
resource_key
(str
) –The primary key ID or name of the memory collection.
-
filter_deleted
(bool
) –Whether to filter out deleted activity sessions. Defaults to True.
-
filter_disabled
(bool
) –Whether to filter out disabled activity sessions. Defaults to True.
Returns:
-
MemoryCollection | None
–MemoryCollection | None: The matching
MemoryCollection
orNone
if not found.