exonware-xwnode 0.0.1.14__py3-none-any.whl → 0.0.1.16__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.
Files changed (131) hide show
  1. exonware/__init__.py +1 -1
  2. exonware/xwnode/__init__.py +1 -1
  3. exonware/xwnode/common/__init__.py +1 -1
  4. exonware/xwnode/common/management/__init__.py +1 -1
  5. exonware/xwnode/common/management/manager.py +1 -1
  6. exonware/xwnode/common/monitoring/__init__.py +1 -1
  7. exonware/xwnode/common/monitoring/metrics.py +1 -1
  8. exonware/xwnode/common/monitoring/pattern_detector.py +1 -1
  9. exonware/xwnode/common/monitoring/performance_monitor.py +1 -1
  10. exonware/xwnode/common/patterns/__init__.py +1 -1
  11. exonware/xwnode/common/patterns/flyweight.py +1 -1
  12. exonware/xwnode/common/utils/__init__.py +1 -1
  13. exonware/xwnode/edges/strategies/__init__.py +1 -1
  14. exonware/xwnode/edges/strategies/base.py +1 -1
  15. exonware/xwnode/facade.py +1 -1
  16. exonware/xwnode/nodes/strategies/__init__.py +1 -1
  17. exonware/xwnode/nodes/strategies/adjacency_list.py +1 -1
  18. exonware/xwnode/nodes/strategies/base.py +1 -1
  19. exonware/xwnode/nodes/strategies/contracts.py +1 -1
  20. exonware/xwnode/nodes/strategies/deque.py +1 -1
  21. exonware/xwnode/nodes/strategies/priority_queue.py +1 -1
  22. exonware/xwnode/nodes/strategies/queue.py +1 -1
  23. exonware/xwnode/nodes/strategies/sparse_matrix.py +1 -1
  24. exonware/xwnode/nodes/strategies/stack.py +1 -1
  25. exonware/xwnode/queries/executors/__init__.py +1 -1
  26. exonware/xwnode/queries/executors/advanced/aggregate_executor.py +1 -1
  27. exonware/xwnode/queries/executors/advanced/ask_executor.py +1 -1
  28. exonware/xwnode/queries/executors/advanced/construct_executor.py +1 -1
  29. exonware/xwnode/queries/executors/advanced/describe_executor.py +1 -1
  30. exonware/xwnode/queries/executors/advanced/for_loop_executor.py +1 -1
  31. exonware/xwnode/queries/executors/advanced/foreach_executor.py +1 -1
  32. exonware/xwnode/queries/executors/advanced/join_executor.py +1 -1
  33. exonware/xwnode/queries/executors/advanced/let_executor.py +1 -1
  34. exonware/xwnode/queries/executors/advanced/mutation_executor.py +1 -1
  35. exonware/xwnode/queries/executors/advanced/options_executor.py +1 -1
  36. exonware/xwnode/queries/executors/advanced/pipe_executor.py +1 -1
  37. exonware/xwnode/queries/executors/advanced/subscribe_executor.py +1 -1
  38. exonware/xwnode/queries/executors/advanced/subscription_executor.py +1 -1
  39. exonware/xwnode/queries/executors/advanced/union_executor.py +1 -1
  40. exonware/xwnode/queries/executors/advanced/window_executor.py +1 -1
  41. exonware/xwnode/queries/executors/advanced/with_cte_executor.py +1 -1
  42. exonware/xwnode/queries/executors/aggregation/avg_executor.py +1 -1
  43. exonware/xwnode/queries/executors/aggregation/count_executor.py +1 -1
  44. exonware/xwnode/queries/executors/aggregation/distinct_executor.py +1 -1
  45. exonware/xwnode/queries/executors/aggregation/group_executor.py +1 -1
  46. exonware/xwnode/queries/executors/aggregation/having_executor.py +1 -1
  47. exonware/xwnode/queries/executors/aggregation/max_executor.py +1 -1
  48. exonware/xwnode/queries/executors/aggregation/min_executor.py +1 -1
  49. exonware/xwnode/queries/executors/aggregation/sum_executor.py +1 -1
  50. exonware/xwnode/queries/executors/aggregation/summarize_executor.py +1 -1
  51. exonware/xwnode/queries/executors/array/indexing_executor.py +1 -1
  52. exonware/xwnode/queries/executors/array/slicing_executor.py +1 -1
  53. exonware/xwnode/queries/executors/base.py +1 -1
  54. exonware/xwnode/queries/executors/capability_checker.py +1 -1
  55. exonware/xwnode/queries/executors/contracts.py +1 -1
  56. exonware/xwnode/queries/executors/core/create_executor.py +1 -1
  57. exonware/xwnode/queries/executors/core/delete_executor.py +1 -1
  58. exonware/xwnode/queries/executors/core/drop_executor.py +1 -1
  59. exonware/xwnode/queries/executors/core/insert_executor.py +1 -1
  60. exonware/xwnode/queries/executors/core/select_executor.py +1 -1
  61. exonware/xwnode/queries/executors/core/update_executor.py +1 -1
  62. exonware/xwnode/queries/executors/data/alter_executor.py +1 -1
  63. exonware/xwnode/queries/executors/data/load_executor.py +1 -1
  64. exonware/xwnode/queries/executors/data/merge_executor.py +1 -1
  65. exonware/xwnode/queries/executors/data/store_executor.py +1 -1
  66. exonware/xwnode/queries/executors/engine.py +1 -1
  67. exonware/xwnode/queries/executors/errors.py +1 -1
  68. exonware/xwnode/queries/executors/filtering/between_executor.py +1 -1
  69. exonware/xwnode/queries/executors/filtering/filter_executor.py +1 -1
  70. exonware/xwnode/queries/executors/filtering/has_executor.py +1 -1
  71. exonware/xwnode/queries/executors/filtering/in_executor.py +1 -1
  72. exonware/xwnode/queries/executors/filtering/like_executor.py +1 -1
  73. exonware/xwnode/queries/executors/filtering/optional_executor.py +1 -1
  74. exonware/xwnode/queries/executors/filtering/range_executor.py +1 -1
  75. exonware/xwnode/queries/executors/filtering/term_executor.py +1 -1
  76. exonware/xwnode/queries/executors/filtering/values_executor.py +1 -1
  77. exonware/xwnode/queries/executors/filtering/where_executor.py +1 -1
  78. exonware/xwnode/queries/executors/graph/in_traverse_executor.py +1 -1
  79. exonware/xwnode/queries/executors/graph/match_executor.py +1 -1
  80. exonware/xwnode/queries/executors/graph/out_executor.py +1 -1
  81. exonware/xwnode/queries/executors/graph/path_executor.py +1 -1
  82. exonware/xwnode/queries/executors/graph/return_executor.py +1 -1
  83. exonware/xwnode/queries/executors/ordering/by_executor.py +1 -1
  84. exonware/xwnode/queries/executors/ordering/order_executor.py +1 -1
  85. exonware/xwnode/queries/executors/projection/extend_executor.py +1 -1
  86. exonware/xwnode/queries/executors/projection/project_executor.py +1 -1
  87. exonware/xwnode/queries/executors/registry.py +1 -1
  88. exonware/xwnode/queries/executors/types.py +1 -1
  89. exonware/xwnode/queries/parsers/__init__.py +26 -0
  90. exonware/xwnode/queries/parsers/base.py +86 -0
  91. exonware/xwnode/queries/parsers/contracts.py +46 -0
  92. exonware/xwnode/queries/parsers/errors.py +53 -0
  93. exonware/xwnode/queries/parsers/sql_param_extractor.py +318 -0
  94. exonware/xwnode/queries/strategies/__init__.py +1 -1
  95. exonware/xwnode/queries/strategies/base.py +1 -1
  96. exonware/xwnode/queries/strategies/cql.py +1 -1
  97. exonware/xwnode/queries/strategies/cypher.py +1 -1
  98. exonware/xwnode/queries/strategies/datalog.py +1 -1
  99. exonware/xwnode/queries/strategies/elastic_dsl.py +1 -1
  100. exonware/xwnode/queries/strategies/eql.py +1 -1
  101. exonware/xwnode/queries/strategies/flux.py +1 -1
  102. exonware/xwnode/queries/strategies/gql.py +1 -1
  103. exonware/xwnode/queries/strategies/graphql.py +1 -1
  104. exonware/xwnode/queries/strategies/gremlin.py +1 -1
  105. exonware/xwnode/queries/strategies/hiveql.py +1 -1
  106. exonware/xwnode/queries/strategies/hql.py +1 -1
  107. exonware/xwnode/queries/strategies/jmespath.py +1 -1
  108. exonware/xwnode/queries/strategies/jq.py +1 -1
  109. exonware/xwnode/queries/strategies/json_query.py +1 -1
  110. exonware/xwnode/queries/strategies/jsoniq.py +1 -1
  111. exonware/xwnode/queries/strategies/kql.py +1 -1
  112. exonware/xwnode/queries/strategies/linq.py +1 -1
  113. exonware/xwnode/queries/strategies/logql.py +1 -1
  114. exonware/xwnode/queries/strategies/mql.py +1 -1
  115. exonware/xwnode/queries/strategies/n1ql.py +1 -1
  116. exonware/xwnode/queries/strategies/partiql.py +1 -1
  117. exonware/xwnode/queries/strategies/pig.py +1 -1
  118. exonware/xwnode/queries/strategies/promql.py +1 -1
  119. exonware/xwnode/queries/strategies/sparql.py +1 -1
  120. exonware/xwnode/queries/strategies/sql.py +1 -1
  121. exonware/xwnode/queries/strategies/xml_query.py +1 -1
  122. exonware/xwnode/queries/strategies/xpath.py +1 -1
  123. exonware/xwnode/queries/strategies/xquery.py +1 -1
  124. exonware/xwnode/queries/strategies/xwnode_executor.py +1 -1
  125. exonware/xwnode/queries/strategies/xwquery.py +43 -11
  126. exonware/xwnode/strategies/__init__.py +1 -1
  127. exonware/xwnode/version.py +2 -2
  128. {exonware_xwnode-0.0.1.14.dist-info → exonware_xwnode-0.0.1.16.dist-info}/METADATA +2 -3
  129. {exonware_xwnode-0.0.1.14.dist-info → exonware_xwnode-0.0.1.16.dist-info}/RECORD +131 -126
  130. {exonware_xwnode-0.0.1.14.dist-info → exonware_xwnode-0.0.1.16.dist-info}/WHEEL +0 -0
  131. {exonware_xwnode-0.0.1.14.dist-info → exonware_xwnode-0.0.1.16.dist-info}/licenses/LICENSE +0 -0
@@ -7,7 +7,7 @@ MERGE Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ STORE Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -10,7 +10,7 @@ with capability checking and routing.
10
10
  Company: eXonware.com
11
11
  Author: Eng. Muhammad AlShehri
12
12
  Email: connect@exonware.com
13
- Version: 0.0.1.14
13
+ Version: 0.0.1.16
14
14
  Generation Date: 08-Oct-2025
15
15
  """
16
16
 
@@ -10,7 +10,7 @@ Extends root error classes per DEV_GUIDELINES.md - no redundancy.
10
10
  Company: eXonware.com
11
11
  Author: Eng. Muhammad AlShehri
12
12
  Email: connect@exonware.com
13
- Version: 0.0.1.14
13
+ Version: 0.0.1.16
14
14
  Generation Date: 08-Oct-2025
15
15
  """
16
16
 
@@ -7,7 +7,7 @@ BETWEEN Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ FILTER Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ HAS Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ IN Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ LIKE Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ OPTIONAL Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ RANGE Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ TERM Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ VALUES Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ WHERE Operation Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 08-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ IN_TRAVERSE Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ MATCH Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ OUT Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ PATH Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ RETURN Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ BY Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ ORDER Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ EXTEND Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -7,7 +7,7 @@ PROJECT Executor
7
7
  Company: eXonware.com
8
8
  Author: Eng. Muhammad AlShehri
9
9
  Email: connect@exonware.com
10
- Version: 0.0.1.14
10
+ Version: 0.0.1.16
11
11
  Generation Date: 09-Oct-2025
12
12
  """
13
13
 
@@ -9,7 +9,7 @@ This module provides registry for managing operation executors.
9
9
  Company: eXonware.com
10
10
  Author: Eng. Muhammad AlShehri
11
11
  Email: connect@exonware.com
12
- Version: 0.0.1.14
12
+ Version: 0.0.1.16
13
13
  Generation Date: 08-Oct-2025
14
14
  """
15
15
 
@@ -10,7 +10,7 @@ Imports shared types from root types.py per DEV_GUIDELINES.md.
10
10
  Company: eXonware.com
11
11
  Author: Eng. Muhammad AlShehri
12
12
  Email: connect@exonware.com
13
- Version: 0.0.1.14
13
+ Version: 0.0.1.16
14
14
  Generation Date: 08-Oct-2025
15
15
  """
16
16
 
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ #exonware/xwnode/src/exonware/xwnode/queries/parsers/__init__.py
4
+
5
+ Query Parsers Module
6
+
7
+ Company: eXonware.com
8
+ Author: Eng. Muhammad AlShehri
9
+ Email: connect@exonware.com
10
+ Version: 0.0.1.16
11
+ Generation Date: 09-Oct-2025
12
+ """
13
+
14
+ from .contracts import IParamExtractor
15
+ from .errors import ParserError, ParseError
16
+ from .base import AParamExtractor
17
+ from .sql_param_extractor import SQLParamExtractor
18
+
19
+ __all__ = [
20
+ 'IParamExtractor',
21
+ 'ParserError',
22
+ 'ParseError',
23
+ 'AParamExtractor',
24
+ 'SQLParamExtractor',
25
+ ]
26
+
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ #exonware/xwnode/src/exonware/xwnode/queries/parsers/base.py
4
+
5
+ Parser Base Classes
6
+
7
+ Abstract base class for parameter extractors.
8
+ Follows DEV_GUIDELINES.md: base.py extends contracts.py interfaces.
9
+
10
+ Company: eXonware.com
11
+ Author: Eng. Muhammad AlShehri
12
+ Email: connect@exonware.com
13
+ Version: 0.0.1.16
14
+ Generation Date: 09-Oct-2025
15
+ """
16
+
17
+ from abc import ABC
18
+ from typing import Dict, Any, Union
19
+
20
+ from .contracts import IParamExtractor
21
+ from .errors import ParseError
22
+
23
+
24
+ class AParamExtractor(IParamExtractor, ABC):
25
+ """
26
+ Abstract base class for parameter extractors.
27
+
28
+ Extends IParamExtractor interface per DEV_GUIDELINES.md.
29
+ """
30
+
31
+ def _parse_value(self, value_str: str) -> Union[str, int, float, bool, None]:
32
+ """
33
+ Parse value from string to appropriate type.
34
+
35
+ Args:
36
+ value_str: String representation of value
37
+
38
+ Returns:
39
+ Parsed value with correct type
40
+ """
41
+ value_str = value_str.strip().strip('"').strip("'")
42
+
43
+ # Try boolean
44
+ if value_str.lower() == 'true':
45
+ return True
46
+ if value_str.lower() == 'false':
47
+ return False
48
+ if value_str.lower() == 'null' or value_str.lower() == 'none':
49
+ return None
50
+
51
+ # Try number
52
+ try:
53
+ if '.' in value_str:
54
+ return float(value_str)
55
+ return int(value_str)
56
+ except ValueError:
57
+ pass
58
+
59
+ # Return as string
60
+ return value_str
61
+
62
+ def _split_fields(self, fields_str: str) -> list:
63
+ """Split comma-separated fields, handling nested expressions."""
64
+ if fields_str.strip() == '*':
65
+ return ['*']
66
+
67
+ fields = []
68
+ current = []
69
+ paren_depth = 0
70
+
71
+ for char in fields_str:
72
+ if char == '(':
73
+ paren_depth += 1
74
+ elif char == ')':
75
+ paren_depth -= 1
76
+ elif char == ',' and paren_depth == 0:
77
+ fields.append(''.join(current).strip())
78
+ current = []
79
+ continue
80
+ current.append(char)
81
+
82
+ if current:
83
+ fields.append(''.join(current).strip())
84
+
85
+ return fields
86
+
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ #exonware/xwnode/src/exonware/xwnode/queries/parsers/contracts.py
4
+
5
+ Parser Contracts
6
+
7
+ Interfaces for query parameter extractors.
8
+ Follows DEV_GUIDELINES.md: contracts.py for all interfaces.
9
+
10
+ Company: eXonware.com
11
+ Author: Eng. Muhammad AlShehri
12
+ Email: connect@exonware.com
13
+ Version: 0.0.1.16
14
+ Generation Date: 09-Oct-2025
15
+ """
16
+
17
+ from abc import ABC, abstractmethod
18
+ from typing import Dict, Any
19
+
20
+
21
+ class IParamExtractor(ABC):
22
+ """
23
+ Interface for parameter extractors.
24
+
25
+ Extracts structured parameters from query strings.
26
+ """
27
+
28
+ @abstractmethod
29
+ def extract_params(self, query: str, action_type: str) -> Dict[str, Any]:
30
+ """
31
+ Extract structured parameters from query.
32
+
33
+ Args:
34
+ query: Raw query string
35
+ action_type: Type of action (SELECT, INSERT, etc.)
36
+
37
+ Returns:
38
+ Structured parameters dictionary
39
+ """
40
+ pass
41
+
42
+ @abstractmethod
43
+ def can_parse(self, query: str) -> bool:
44
+ """Check if this extractor can parse the query."""
45
+ pass
46
+
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ #exonware/xwnode/src/exonware/xwnode/queries/parsers/errors.py
4
+
5
+ Parser Errors
6
+
7
+ Module-specific errors for query parsers.
8
+ Extends root error classes per DEV_GUIDELINES.md - no redundancy.
9
+
10
+ Company: eXonware.com
11
+ Author: Eng. Muhammad AlShehri
12
+ Email: connect@exonware.com
13
+ Version: 0.0.1.16
14
+ Generation Date: 09-Oct-2025
15
+ """
16
+
17
+ # Import and REUSE root error classes per DEV_GUIDELINES
18
+ from ...errors import XWNodeError, XWNodeValueError
19
+
20
+
21
+ class ParserError(XWNodeError):
22
+ """
23
+ Base error for parser operations.
24
+
25
+ Extends XWNodeError from root - follows DEV_GUIDELINES principle.
26
+ """
27
+ pass
28
+
29
+
30
+ class ParseError(ParserError):
31
+ """Raised when query parsing fails."""
32
+
33
+ def __init__(self, query: str, reason: str, position: int = None):
34
+ message = f"Failed to parse query: {reason}"
35
+ if position is not None:
36
+ message += f" at position {position}"
37
+ super().__init__(message)
38
+ self.query = query
39
+ self.reason = reason
40
+ self.position = position
41
+
42
+
43
+ class UnsupportedSyntaxError(ParserError):
44
+ """Raised when syntax is not supported."""
45
+ pass
46
+
47
+
48
+ __all__ = [
49
+ 'ParserError',
50
+ 'ParseError',
51
+ 'UnsupportedSyntaxError',
52
+ ]
53
+