Coverage for src/fluree_py/http/protocol/mixin/where.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-02 03:03 +0000

1from typing import Generic, Protocol, TypeVar 

2 

3from fluree_py.types.query.where import WhereClause 

4 

5 

6class HasWhereData(Protocol): 

7 """Protocol for objects that have where clause data.""" 

8 

9 where: WhereClause | None 

10 

11 

12T = TypeVar("T", bound="HasWhereData", covariant=True) 

13 

14 

15class SupportsWhere(Generic[T], Protocol): 

16 """Protocol for objects that support where clause operations.""" 

17 

18 where: WhereClause | None = None 

19 

20 def with_where(self, clause: WhereClause) -> T: ...