exonware-xwnode 0.0.1.13__py3-none-any.whl → 0.0.1.15__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.
- exonware/__init__.py +1 -1
- exonware/xwnode/__init__.py +1 -1
- exonware/xwnode/base.py +1 -1
- exonware/xwnode/common/__init__.py +20 -0
- exonware/xwnode/common/management/__init__.py +26 -0
- exonware/xwnode/{strategies → common/management}/manager.py +2 -2
- exonware/xwnode/common/monitoring/__init__.py +26 -0
- exonware/xwnode/{strategies → common/monitoring}/metrics.py +2 -2
- exonware/xwnode/{strategies → common/monitoring}/pattern_detector.py +2 -2
- exonware/xwnode/{strategies → common/monitoring}/performance_monitor.py +2 -2
- exonware/xwnode/common/patterns/__init__.py +26 -0
- exonware/xwnode/{strategies → common/patterns}/advisor.py +1 -1
- exonware/xwnode/{strategies → common/patterns}/flyweight.py +4 -4
- exonware/xwnode/{strategies → common/patterns}/registry.py +109 -112
- exonware/xwnode/common/utils/__init__.py +26 -0
- exonware/xwnode/{strategies/edges → edges/strategies}/__init__.py +1 -1
- exonware/xwnode/{strategies/edges → edges/strategies}/base.py +3 -3
- exonware/xwnode/facade.py +4 -3
- exonware/xwnode/{strategies/nodes → nodes/strategies}/__init__.py +1 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/adjacency_list.py +7 -2
- exonware/xwnode/{strategies/nodes → nodes/strategies}/aho_corasick.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/array_list.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/base.py +24 -4
- exonware/xwnode/nodes/strategies/contracts.py +116 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/deque.py +7 -2
- exonware/xwnode/{strategies/nodes → nodes/strategies}/hash_map.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/heap.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/linked_list.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_aho_corasick.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_array_list.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_avl_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_b_plus_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_bitmap.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_bitset_dynamic.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_bloom_filter.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_btree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_count_min_sketch.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_cow_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_fenwick_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_hash_map.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_heap.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_hyperloglog.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_linked_list.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_lsm_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_ordered_map.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_ordered_map_balanced.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_patricia.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_persistent_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_radix_trie.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_red_black_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_roaring_bitmap.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_segment_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_set_hash.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_set_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_skip_list.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_splay_tree.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_suffix_array.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_treap.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_tree_graph_hybrid.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_trie.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_union_find.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/node_xdata_optimized.py +4 -0
- exonware/xwnode/{strategies/nodes → nodes/strategies}/priority_queue.py +7 -2
- exonware/xwnode/{strategies/nodes → nodes/strategies}/queue.py +7 -2
- exonware/xwnode/{strategies/nodes → nodes/strategies}/sparse_matrix.py +7 -2
- exonware/xwnode/{strategies/nodes → nodes/strategies}/stack.py +7 -2
- exonware/xwnode/{strategies/nodes → nodes/strategies}/trie.py +6 -1
- exonware/xwnode/{strategies/nodes → nodes/strategies}/union_find.py +6 -1
- exonware/xwnode/queries/executors/__init__.py +47 -0
- exonware/xwnode/queries/executors/advanced/__init__.py +37 -0
- exonware/xwnode/queries/executors/advanced/aggregate_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/ask_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/construct_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/describe_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/for_loop_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/foreach_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/join_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/let_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/mutation_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/options_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/pipe_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/subscribe_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/subscription_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/union_executor.py +50 -0
- exonware/xwnode/queries/executors/advanced/window_executor.py +51 -0
- exonware/xwnode/queries/executors/advanced/with_cte_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/__init__.py +21 -0
- exonware/xwnode/queries/executors/aggregation/avg_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/count_executor.py +38 -0
- exonware/xwnode/queries/executors/aggregation/distinct_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/group_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/having_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/max_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/min_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/sum_executor.py +50 -0
- exonware/xwnode/queries/executors/aggregation/summarize_executor.py +50 -0
- exonware/xwnode/queries/executors/array/__init__.py +9 -0
- exonware/xwnode/queries/executors/array/indexing_executor.py +51 -0
- exonware/xwnode/queries/executors/array/slicing_executor.py +51 -0
- exonware/xwnode/queries/executors/base.py +257 -0
- exonware/xwnode/queries/executors/capability_checker.py +204 -0
- exonware/xwnode/queries/executors/contracts.py +166 -0
- exonware/xwnode/queries/executors/core/__init__.py +17 -0
- exonware/xwnode/queries/executors/core/create_executor.py +96 -0
- exonware/xwnode/queries/executors/core/delete_executor.py +99 -0
- exonware/xwnode/queries/executors/core/drop_executor.py +100 -0
- exonware/xwnode/queries/executors/core/insert_executor.py +39 -0
- exonware/xwnode/queries/executors/core/select_executor.py +152 -0
- exonware/xwnode/queries/executors/core/update_executor.py +102 -0
- exonware/xwnode/queries/executors/data/__init__.py +13 -0
- exonware/xwnode/queries/executors/data/alter_executor.py +50 -0
- exonware/xwnode/queries/executors/data/load_executor.py +50 -0
- exonware/xwnode/queries/executors/data/merge_executor.py +50 -0
- exonware/xwnode/queries/executors/data/store_executor.py +50 -0
- exonware/xwnode/queries/executors/engine.py +221 -0
- exonware/xwnode/queries/executors/errors.py +68 -0
- exonware/xwnode/queries/executors/filtering/__init__.py +25 -0
- exonware/xwnode/queries/executors/filtering/between_executor.py +80 -0
- exonware/xwnode/queries/executors/filtering/filter_executor.py +79 -0
- exonware/xwnode/queries/executors/filtering/has_executor.py +70 -0
- exonware/xwnode/queries/executors/filtering/in_executor.py +70 -0
- exonware/xwnode/queries/executors/filtering/like_executor.py +76 -0
- exonware/xwnode/queries/executors/filtering/optional_executor.py +76 -0
- exonware/xwnode/queries/executors/filtering/range_executor.py +80 -0
- exonware/xwnode/queries/executors/filtering/term_executor.py +77 -0
- exonware/xwnode/queries/executors/filtering/values_executor.py +71 -0
- exonware/xwnode/queries/executors/filtering/where_executor.py +44 -0
- exonware/xwnode/queries/executors/graph/__init__.py +15 -0
- exonware/xwnode/queries/executors/graph/in_traverse_executor.py +51 -0
- exonware/xwnode/queries/executors/graph/match_executor.py +51 -0
- exonware/xwnode/queries/executors/graph/out_executor.py +51 -0
- exonware/xwnode/queries/executors/graph/path_executor.py +51 -0
- exonware/xwnode/queries/executors/graph/return_executor.py +51 -0
- exonware/xwnode/queries/executors/ordering/__init__.py +9 -0
- exonware/xwnode/queries/executors/ordering/by_executor.py +50 -0
- exonware/xwnode/queries/executors/ordering/order_executor.py +51 -0
- exonware/xwnode/queries/executors/projection/__init__.py +9 -0
- exonware/xwnode/queries/executors/projection/extend_executor.py +50 -0
- exonware/xwnode/queries/executors/projection/project_executor.py +50 -0
- exonware/xwnode/queries/executors/registry.py +173 -0
- exonware/xwnode/queries/executors/types.py +93 -0
- exonware/xwnode/queries/parsers/__init__.py +26 -0
- exonware/xwnode/queries/parsers/base.py +86 -0
- exonware/xwnode/queries/parsers/contracts.py +46 -0
- exonware/xwnode/queries/parsers/errors.py +53 -0
- exonware/xwnode/queries/parsers/sql_param_extractor.py +318 -0
- exonware/xwnode/{strategies/queries → queries/strategies}/__init__.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/base.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/cql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/cypher.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/datalog.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/elastic_dsl.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/eql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/flux.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/gql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/graphql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/gremlin.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/hiveql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/hql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/jmespath.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/jq.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/json_query.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/jsoniq.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/kql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/linq.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/logql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/mql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/n1ql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/partiql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/pig.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/promql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/sparql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/sql.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/xml_query.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/xpath.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/xquery.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/xwnode_executor.py +1 -1
- exonware/xwnode/{strategies/queries → queries/strategies}/xwquery.py +43 -11
- exonware/xwnode/strategies/__init__.py +8 -8
- exonware/xwnode/version.py +3 -3
- {exonware_xwnode-0.0.1.13.dist-info → exonware_xwnode-0.0.1.15.dist-info}/METADATA +2 -3
- exonware_xwnode-0.0.1.15.dist-info/RECORD +214 -0
- exonware/xwnode/strategies/impls/__init__.py +0 -13
- exonware/xwnode/strategies/nodes/_base_node.py +0 -307
- exonware_xwnode-0.0.1.13.dist-info/RECORD +0 -132
- /exonware/xwnode/{strategies → common/management}/migration.py +0 -0
- /exonware/xwnode/{strategies → common/utils}/simple.py +0 -0
- /exonware/xwnode/{strategies → common/utils}/utils.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/_base_edge.py +0 -0
- /exonware/xwnode/{strategies/edges → edges/strategies}/adj_list.py +0 -0
- /exonware/xwnode/{strategies/edges → edges/strategies}/adj_matrix.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_adj_list.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_adj_matrix.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_bidir_wrapper.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_block_adj_matrix.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_coo.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_csc.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_csr.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_dynamic_adj_list.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_flow_network.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_hyperedge_set.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_neural_graph.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_octree.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_property_store.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_quadtree.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_rtree.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_temporal_edgeset.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_tree_graph_basic.py +0 -0
- /exonware/xwnode/{strategies/impls → edges/strategies}/edge_weighted_graph.py +0 -0
- /exonware/xwnode/{strategies/impls → nodes/strategies}/_base_node.py +0 -0
- /exonware/xwnode/{strategies/nodes → nodes/strategies}/node_cuckoo_hash.py +0 -0
- {exonware_xwnode-0.0.1.13.dist-info → exonware_xwnode-0.0.1.15.dist-info}/WHEEL +0 -0
- {exonware_xwnode-0.0.1.13.dist-info → exonware_xwnode-0.0.1.15.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/advanced/with_cte_executor.py
|
4
|
+
|
5
|
+
WITH Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class WithCteExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
WITH operation executor.
|
22
|
+
|
23
|
+
Common Table Expressions
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: CONTROL_FLOW
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "WITH"
|
30
|
+
OPERATION_TYPE = OperationType.CONTROL_FLOW
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute WITH operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_with_cte(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_with_cte(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute with_cte logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'WITH executed', 'params': params}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"""Aggregation operation executors."""
|
2
|
+
|
3
|
+
from .sum_executor import SumExecutor
|
4
|
+
from .avg_executor import AvgExecutor
|
5
|
+
from .min_executor import MinExecutor
|
6
|
+
from .max_executor import MaxExecutor
|
7
|
+
from .distinct_executor import DistinctExecutor
|
8
|
+
from .group_executor import GroupExecutor
|
9
|
+
from .having_executor import HavingExecutor
|
10
|
+
from .summarize_executor import SummarizeExecutor
|
11
|
+
|
12
|
+
__all__ = [
|
13
|
+
'SumExecutor',
|
14
|
+
'AvgExecutor',
|
15
|
+
'MinExecutor',
|
16
|
+
'MaxExecutor',
|
17
|
+
'DistinctExecutor',
|
18
|
+
'GroupExecutor',
|
19
|
+
'HavingExecutor',
|
20
|
+
'SummarizeExecutor',
|
21
|
+
]
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/avg_executor.py
|
4
|
+
|
5
|
+
AVG Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class AvgExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
AVG operation executor.
|
22
|
+
|
23
|
+
Computes average of numeric values
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "AVG"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute AVG operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_avg(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_avg(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute avg logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'AVG executed', 'params': params}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/count_executor.py
|
4
|
+
|
5
|
+
COUNT Operation Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 08-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from ..base import AUniversalOperationExecutor
|
15
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
16
|
+
|
17
|
+
|
18
|
+
class CountExecutor(AUniversalOperationExecutor):
|
19
|
+
"""COUNT operation executor - Universal aggregation."""
|
20
|
+
|
21
|
+
OPERATION_NAME = "COUNT"
|
22
|
+
|
23
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
24
|
+
"""Execute COUNT operation."""
|
25
|
+
# Count items in node
|
26
|
+
count = 0
|
27
|
+
|
28
|
+
if hasattr(context.node, '__len__'):
|
29
|
+
count = len(context.node)
|
30
|
+
elif hasattr(context.node, 'size'):
|
31
|
+
count = context.node.size()
|
32
|
+
elif hasattr(context.node, '_strategy') and hasattr(context.node._strategy, 'size'):
|
33
|
+
count = context.node._strategy.size()
|
34
|
+
|
35
|
+
return ExecutionResult(data={'count': count}, affected_count=count)
|
36
|
+
|
37
|
+
|
38
|
+
__all__ = ['CountExecutor']
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/distinct_executor.py
|
4
|
+
|
5
|
+
DISTINCT Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class DistinctExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
DISTINCT operation executor.
|
22
|
+
|
23
|
+
Returns distinct/unique values
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "DISTINCT"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute DISTINCT operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_distinct(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_distinct(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute distinct logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'DISTINCT executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/group_executor.py
|
4
|
+
|
5
|
+
GROUP Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class GroupExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
GROUP operation executor.
|
22
|
+
|
23
|
+
Groups data by specified fields
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "GROUP"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute GROUP operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_group(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_group(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute group logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'GROUP executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/having_executor.py
|
4
|
+
|
5
|
+
HAVING Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class HavingExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
HAVING operation executor.
|
22
|
+
|
23
|
+
Filters grouped data
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "HAVING"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute HAVING operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_having(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_having(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute having logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'HAVING executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/max_executor.py
|
4
|
+
|
5
|
+
MAX Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class MaxExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
MAX operation executor.
|
22
|
+
|
23
|
+
Finds maximum value
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "MAX"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute MAX operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_max(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_max(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute max logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'MAX executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/min_executor.py
|
4
|
+
|
5
|
+
MIN Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class MinExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
MIN operation executor.
|
22
|
+
|
23
|
+
Finds minimum value
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "MIN"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute MIN operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_min(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_min(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute min logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'MIN executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/sum_executor.py
|
4
|
+
|
5
|
+
SUM Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class SumExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
SUM operation executor.
|
22
|
+
|
23
|
+
Computes sum of numeric values
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "SUM"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute SUM operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_sum(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_sum(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute sum logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'SUM executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/aggregation/summarize_executor.py
|
4
|
+
|
5
|
+
SUMMARIZE Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AUniversalOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
|
19
|
+
class SummarizeExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
SUMMARIZE operation executor.
|
22
|
+
|
23
|
+
Summarizes data with aggregations
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "SUMMARIZE"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute SUMMARIZE operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_summarize(node, params, context)
|
39
|
+
|
40
|
+
return ExecutionResult(
|
41
|
+
success=True,
|
42
|
+
data=result_data,
|
43
|
+
operation=self.OPERATION_NAME,
|
44
|
+
metadata={'operation': self.OPERATION_NAME}
|
45
|
+
)
|
46
|
+
|
47
|
+
def _execute_summarize(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute summarize logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'SUMMARIZE executed', 'params': params}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/array/indexing_executor.py
|
4
|
+
|
5
|
+
INDEXING Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
from ...nodes.strategies.contracts import NodeType
|
19
|
+
|
20
|
+
class IndexingExecutor(AOperationExecutor):
|
21
|
+
"""
|
22
|
+
INDEXING operation executor.
|
23
|
+
|
24
|
+
Array indexing operations
|
25
|
+
|
26
|
+
Capability: LINEAR, MATRIX, TREE only
|
27
|
+
Operation Type: ARRAY
|
28
|
+
"""
|
29
|
+
|
30
|
+
OPERATION_NAME = "INDEXING"
|
31
|
+
OPERATION_TYPE = OperationType.ARRAY
|
32
|
+
SUPPORTED_NODE_TYPES = [NodeType.LINEAR, NodeType.MATRIX, NodeType.TREE]
|
33
|
+
|
34
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
35
|
+
"""Execute INDEXING operation."""
|
36
|
+
params = action.params
|
37
|
+
node = context.node
|
38
|
+
|
39
|
+
result_data = self._execute_indexing(node, params, context)
|
40
|
+
|
41
|
+
return ExecutionResult(
|
42
|
+
success=True,
|
43
|
+
data=result_data,
|
44
|
+
operation=self.OPERATION_NAME,
|
45
|
+
metadata={'operation': self.OPERATION_NAME}
|
46
|
+
)
|
47
|
+
|
48
|
+
def _execute_indexing(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
49
|
+
"""Execute indexing logic."""
|
50
|
+
# Implementation here
|
51
|
+
return {'result': 'INDEXING executed', 'params': params}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/array/slicing_executor.py
|
4
|
+
|
5
|
+
SLICING Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.15
|
11
|
+
Generation Date: 09-Oct-2025
|
12
|
+
"""
|
13
|
+
|
14
|
+
from typing import Any, Dict, List
|
15
|
+
from ..base import AOperationExecutor
|
16
|
+
from ..contracts import Action, ExecutionContext, ExecutionResult
|
17
|
+
from ..types import OperationType
|
18
|
+
from ...nodes.strategies.contracts import NodeType
|
19
|
+
|
20
|
+
class SlicingExecutor(AOperationExecutor):
|
21
|
+
"""
|
22
|
+
SLICING operation executor.
|
23
|
+
|
24
|
+
Array slicing operations
|
25
|
+
|
26
|
+
Capability: LINEAR, MATRIX only
|
27
|
+
Operation Type: ARRAY
|
28
|
+
"""
|
29
|
+
|
30
|
+
OPERATION_NAME = "SLICING"
|
31
|
+
OPERATION_TYPE = OperationType.ARRAY
|
32
|
+
SUPPORTED_NODE_TYPES = [NodeType.LINEAR, NodeType.MATRIX]
|
33
|
+
|
34
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
35
|
+
"""Execute SLICING operation."""
|
36
|
+
params = action.params
|
37
|
+
node = context.node
|
38
|
+
|
39
|
+
result_data = self._execute_slicing(node, params, context)
|
40
|
+
|
41
|
+
return ExecutionResult(
|
42
|
+
success=True,
|
43
|
+
data=result_data,
|
44
|
+
operation=self.OPERATION_NAME,
|
45
|
+
metadata={'operation': self.OPERATION_NAME}
|
46
|
+
)
|
47
|
+
|
48
|
+
def _execute_slicing(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
49
|
+
"""Execute slicing logic."""
|
50
|
+
# Implementation here
|
51
|
+
return {'result': 'SLICING executed', 'params': params}
|