| 62 | |
| 63 | @dataclass |
| 64 | class BaseKVStorage(Generic[T], StorageNameSpace): |
| 65 | embedding_func: EmbeddingFunc |
| 66 | |
| 67 | async def all_keys(self) -> list[str]: |
| 68 | raise NotImplementedError |
| 69 | |
| 70 | async def get_by_id(self, id: str) -> Union[T, None]: |
| 71 | raise NotImplementedError |
| 72 | |
| 73 | async def get_by_ids( |
| 74 | self, ids: list[str], fields: Union[set[str], None] = None |
| 75 | ) -> list[Union[T, None]]: |
| 76 | raise NotImplementedError |
| 77 | |
| 78 | async def filter_keys(self, data: list[str]) -> set[str]: |
| 79 | """return un-exist keys""" |
| 80 | raise NotImplementedError |
| 81 | |
| 82 | async def upsert(self, data: dict[str, T]): |
| 83 | raise NotImplementedError |
| 84 | |
| 85 | async def drop(self): |
| 86 | raise NotImplementedError |
| 87 | |
| 88 | |
| 89 | @dataclass |
nothing calls this directly
no outgoing calls
no test coverage detected