-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
#14 introduced Query type. The existing APIs that use a string as a query expression need to be updated such as.
| path_pattern: Optional[str], |
centraldogma-python/centraldogma/query.py
Lines 30 to 45 in 6098f1a
| class Query(Generic[T]): | |
| @staticmethod | |
| def identity(path: str) -> Query[str]: | |
| return Query(path=path, query_type=QueryType.IDENTITY, expressions=[]) | |
| @staticmethod | |
| def text(path: str) -> Query[str]: | |
| return Query(path=path, query_type=QueryType.IDENTITY_TEXT, expressions=[]) | |
| @staticmethod | |
| def json(path: str) -> Query[Any]: | |
| return Query(path=path, query_type=QueryType.IDENTITY_JSON, expressions=[]) | |
| @staticmethod | |
| def json_path(path: str, json_paths: List[str]) -> Query[Any]: | |
| return Query(path=path, query_type=QueryType.JSON_PATH, expressions=json_paths) |