コード例 #1
0
ファイル: _helpers.py プロジェクト: kx30/igorPython
 def _construct_merge_paths(self, merge):
     for merge_field in merge:
         if isinstance(merge_field, FieldPath):
             yield merge_field
         else:
             yield FieldPath(*parse_field_path(merge_field))
コード例 #2
0
def test_parse_field_path_w_escaped_backslash():
    from google.cloud.firestore_v1 import field_path

    assert field_path.parse_field_path("`a\\\\b`.c.d") == ["a\\b", "c", "d"]
コード例 #3
0
def test_parse_field_path_w_first_name_escaped_wo_closing_backtick():
    from google.cloud.firestore_v1 import field_path

    with pytest.raises(ValueError):
        field_path.parse_field_path("`a\\`b.c.d")
コード例 #4
0
def test_parse_field_path_wo_escaped_names():
    from google.cloud.firestore_v1 import field_path

    assert field_path.parse_field_path("a.b.c") == ["a", "b", "c"]
コード例 #5
0
    def _call_fut(path):
        from google.cloud.firestore_v1 import field_path

        return field_path.parse_field_path(path)
コード例 #6
0
ファイル: _helpers.py プロジェクト: yvdjee/python-firestore
 def _construct_merge_paths(self, merge) -> Generator[Any, Any, None]:
     for merge_field in merge:
         if isinstance(merge_field, FieldPath):
             yield merge_field
         else:
             yield FieldPath(*parse_field_path(merge_field))
コード例 #7
0
    def _call_fut(path):
        from google.cloud.firestore_v1 import field_path

        return field_path.parse_field_path(path)
コード例 #8
0
 def _construct_merge_paths(self, merge):
     for merge_field in merge:
         if isinstance(merge_field, FieldPath):
             yield merge_field
         else:
             yield FieldPath(*parse_field_path(merge_field))