fix: fix the issue of nested field access
This commit is contained in:
parent
f1ab2e1601
commit
a63dd8c4c3
@ -15,6 +15,10 @@ class QueryExpression:
|
|||||||
def __init__(self, field_name: str):
|
def __init__(self, field_name: str):
|
||||||
self.field_name = field_name
|
self.field_name = field_name
|
||||||
|
|
||||||
|
def __getattr__(self, name: str) -> 'QueryExpression':
|
||||||
|
"""Handle nested field access like FLID.identity"""
|
||||||
|
return QueryExpression(f"{self.field_name}.{name}")
|
||||||
|
|
||||||
def __eq__(self, other: Any) -> Dict[str, Any]:
|
def __eq__(self, other: Any) -> Dict[str, Any]:
|
||||||
"""Handle field == value comparisons"""
|
"""Handle field == value comparisons"""
|
||||||
return {self.field_name: other}
|
return {self.field_name: other}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user