#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], |
|
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) |
#14 introduced
Querytype. The existing APIs that use a string as a query expression need to be updated such as.centraldogma-python/centraldogma/content_service.py
Line 44 in 6098f1a
centraldogma-python/centraldogma/query.py
Lines 30 to 45 in 6098f1a