NGPIris 5.7.0.dev2__py3-none-any.whl → 5.7.0.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- NGPIris/hci/query_string.py +19 -1
- {ngpiris-5.7.0.dev2.dist-info → ngpiris-5.7.0.dev3.dist-info}/METADATA +1 -1
- {ngpiris-5.7.0.dev2.dist-info → ngpiris-5.7.0.dev3.dist-info}/RECORD +7 -7
- {ngpiris-5.7.0.dev2.dist-info → ngpiris-5.7.0.dev3.dist-info}/WHEEL +0 -0
- {ngpiris-5.7.0.dev2.dist-info → ngpiris-5.7.0.dev3.dist-info}/entry_points.txt +0 -0
- {ngpiris-5.7.0.dev2.dist-info → ngpiris-5.7.0.dev3.dist-info}/licenses/LICENSE +0 -0
- {ngpiris-5.7.0.dev2.dist-info → ngpiris-5.7.0.dev3.dist-info}/top_level.txt +0 -0
NGPIris/hci/query_string.py
CHANGED
|
@@ -2,6 +2,12 @@ from dataclasses import dataclass
|
|
|
2
2
|
from typing import Literal
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
class WhiteSpaceInWildCardSearchError(Exception):
|
|
6
|
+
"""
|
|
7
|
+
Error for when a whitespace is found in a wildcard search.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
5
11
|
@dataclass(frozen=True)
|
|
6
12
|
class QueryString:
|
|
7
13
|
"""
|
|
@@ -51,7 +57,19 @@ class Field(QueryString):
|
|
|
51
57
|
Method for turning a :py:class:`~NGPIris.hci.query_string.Field` into a
|
|
52
58
|
string.
|
|
53
59
|
"""
|
|
54
|
-
|
|
60
|
+
value = str(self.value)
|
|
61
|
+
|
|
62
|
+
# If a wildcard is used, then we can't format it as a Lucene term
|
|
63
|
+
if ("*" in value) or ("?" in value):
|
|
64
|
+
if " " in value:
|
|
65
|
+
msg = (
|
|
66
|
+
'Whitespace was found in "'
|
|
67
|
+
+ value
|
|
68
|
+
+ '" which cannot be processed in a wildcard search'
|
|
69
|
+
)
|
|
70
|
+
raise WhiteSpaceInWildCardSearchError(msg)
|
|
71
|
+
return self.field_name + ":" + value
|
|
72
|
+
return self.field_name + ":" + '"' + value + '"'
|
|
55
73
|
|
|
56
74
|
|
|
57
75
|
@dataclass(frozen=True)
|
|
@@ -7,7 +7,7 @@ NGPIris/hci/exceptions.py,sha256=fLgJQet-zxXoLq4W1MJPE6HzvNwNC1TT3GApGaC8KOc,414
|
|
|
7
7
|
NGPIris/hci/hci.py,sha256=5f0ERol5F5f5RH9HbQRaWm_ZvUXdhS9G2fkKKJRUyUs,8170
|
|
8
8
|
NGPIris/hci/hci_api_requests.py,sha256=Zuj4ZMvjIqMlMvhiGxwA4STzy7at0hLjEqBB9FWgX3o,4700
|
|
9
9
|
NGPIris/hci/helpers.py,sha256=bh8M3PBiMBNlE4tPdO9SPfvhYxPOOXJgbjQ0uQeZoOQ,2675
|
|
10
|
-
NGPIris/hci/query_string.py,sha256=
|
|
10
|
+
NGPIris/hci/query_string.py,sha256=kiGNcCWhnZ_fOINNaXQAAL9uR_rArjd6gVXVB1b-3SA,3362
|
|
11
11
|
NGPIris/hci/types.py,sha256=W8LflWJKDPudHZ0rIW2tdcaZ1zCOBJx2zPTv9ra3zXw,7987
|
|
12
12
|
NGPIris/hcp/__init__.py,sha256=XcwyGKjCIBapkONvurw_sFNJC3EiYenJwRa4foS8unY,68
|
|
13
13
|
NGPIris/hcp/exceptions.py,sha256=wgbLW4dfnjyxJkpdmi_aHawB2iIFX4LUYeinEWMjZP4,2460
|
|
@@ -20,9 +20,9 @@ NGPIris/parse_credentials/parse_credentials.py,sha256=meUCqTOpsBqTXS-tpN_JUxyvoU
|
|
|
20
20
|
NGPIris/utils/__init__.py,sha256=MSJyKBuxCBYH7a7C03lO0D5d8exS3t2KTg-qJvWL08o,119
|
|
21
21
|
NGPIris/utils/deprecation.py,sha256=RdG87CjBUpjWdTZUXWjXOTA4hvP_ItUb8JWkhYIExlA,1128
|
|
22
22
|
NGPIris/utils/utils.py,sha256=FqJpQHDJmZk5Pafzm3sW6WfXvEi4sKCM463_pITMx_o,367
|
|
23
|
-
ngpiris-5.7.0.
|
|
24
|
-
ngpiris-5.7.0.
|
|
25
|
-
ngpiris-5.7.0.
|
|
26
|
-
ngpiris-5.7.0.
|
|
27
|
-
ngpiris-5.7.0.
|
|
28
|
-
ngpiris-5.7.0.
|
|
23
|
+
ngpiris-5.7.0.dev3.dist-info/licenses/LICENSE,sha256=ZA2Q9u5AEkH_YoNNDRsz-DBJ6ZuL_foE7RsKFjXd4-c,18093
|
|
24
|
+
ngpiris-5.7.0.dev3.dist-info/METADATA,sha256=ODCLYxgeeNILVzS6uorouW9oAZJNKeVd9w8jlXDnGSo,6518
|
|
25
|
+
ngpiris-5.7.0.dev3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
26
|
+
ngpiris-5.7.0.dev3.dist-info/entry_points.txt,sha256=t8ADhe3ovPm9tW3XDZq1_vKmfHY98Ei_o6WioJobNzU,117
|
|
27
|
+
ngpiris-5.7.0.dev3.dist-info/top_level.txt,sha256=954WCuIJkle_SMtr7MNPapiiLLAFhlKbcz6Bp89-2V0,8
|
|
28
|
+
ngpiris-5.7.0.dev3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|