exonware-xwnode 0.0.1.12__py3-none-any.whl → 0.0.1.14__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/{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/xwquery_strategy.py → queries/strategies/xwquery.py} +1 -1
- exonware/xwnode/strategies/__init__.py +8 -8
- exonware/xwnode/version.py +3 -3
- {exonware_xwnode-0.0.1.12.dist-info → exonware_xwnode-0.0.1.14.dist-info}/METADATA +2 -2
- exonware_xwnode-0.0.1.14.dist-info/RECORD +209 -0
- exonware/xwnode/strategies/impls/__init__.py +0 -13
- exonware/xwnode/strategies/nodes/_base_node.py +0 -307
- exonware_xwnode-0.0.1.12.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.12.dist-info → exonware_xwnode-0.0.1.14.dist-info}/WHEEL +0 -0
- {exonware_xwnode-0.0.1.12.dist-info → exonware_xwnode-0.0.1.14.dist-info}/licenses/LICENSE +0 -0
exonware/__init__.py
CHANGED
exonware/xwnode/__init__.py
CHANGED
exonware/xwnode/base.py
CHANGED
@@ -199,7 +199,7 @@ class XWNodeBase(iNodeFacade):
|
|
199
199
|
"""Create XWNodeBase from native data."""
|
200
200
|
# For now, we'll use a simple hash map strategy
|
201
201
|
# In the full implementation, this would use the strategy manager
|
202
|
-
from .
|
202
|
+
from .common.utils.simple import SimpleNodeStrategy
|
203
203
|
strategy = SimpleNodeStrategy.create_from_data(data)
|
204
204
|
return cls(strategy)
|
205
205
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/__init__.py
|
3
|
+
|
4
|
+
Common utilities and patterns shared across xwnode.
|
5
|
+
|
6
|
+
Company: eXonware.com
|
7
|
+
Author: Eng. Muhammad AlShehri
|
8
|
+
Email: connect@exonware.com
|
9
|
+
Version: 0.0.1.14
|
10
|
+
"""
|
11
|
+
|
12
|
+
# Export common patterns
|
13
|
+
from .patterns import *
|
14
|
+
from .monitoring import *
|
15
|
+
from .management import *
|
16
|
+
from .utils import *
|
17
|
+
|
18
|
+
__all__ = [
|
19
|
+
# Re-export from submodules
|
20
|
+
]
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/management/__init__.py
|
3
|
+
|
4
|
+
Management module for xwnode.
|
5
|
+
|
6
|
+
Company: eXonware.com
|
7
|
+
Author: Eng. Muhammad AlShehri
|
8
|
+
Email: connect@exonware.com
|
9
|
+
Version: 0.0.1.14
|
10
|
+
"""
|
11
|
+
|
12
|
+
# Import and export main components
|
13
|
+
from pathlib import Path
|
14
|
+
import importlib
|
15
|
+
|
16
|
+
# Auto-discover and import all modules
|
17
|
+
_current_dir = Path(__file__).parent
|
18
|
+
for _file in _current_dir.glob('*.py'):
|
19
|
+
if _file.name != '__init__.py' and not _file.name.startswith('_'):
|
20
|
+
_module_name = _file.stem
|
21
|
+
try:
|
22
|
+
globals()[_module_name] = importlib.import_module(f'.{_module_name}', package=__name__)
|
23
|
+
except ImportError:
|
24
|
+
pass
|
25
|
+
|
26
|
+
__all__ = []
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"""
|
2
|
-
#exonware/xwnode/src/exonware/xwnode/
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/management/manager.py
|
3
3
|
|
4
4
|
Enhanced Strategy Manager
|
5
5
|
|
@@ -12,7 +12,7 @@ This module provides the enhanced StrategyManager class that integrates:
|
|
12
12
|
Company: eXonware.com
|
13
13
|
Author: Eng. Muhammad AlShehri
|
14
14
|
Email: connect@exonware.com
|
15
|
-
Version: 0.0.1.
|
15
|
+
Version: 0.0.1.14
|
16
16
|
Generation Date: 07-Sep-2025
|
17
17
|
"""
|
18
18
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/monitoring/__init__.py
|
3
|
+
|
4
|
+
Monitoring module for xwnode.
|
5
|
+
|
6
|
+
Company: eXonware.com
|
7
|
+
Author: Eng. Muhammad AlShehri
|
8
|
+
Email: connect@exonware.com
|
9
|
+
Version: 0.0.1.14
|
10
|
+
"""
|
11
|
+
|
12
|
+
# Import and export main components
|
13
|
+
from pathlib import Path
|
14
|
+
import importlib
|
15
|
+
|
16
|
+
# Auto-discover and import all modules
|
17
|
+
_current_dir = Path(__file__).parent
|
18
|
+
for _file in _current_dir.glob('*.py'):
|
19
|
+
if _file.name != '__init__.py' and not _file.name.startswith('_'):
|
20
|
+
_module_name = _file.stem
|
21
|
+
try:
|
22
|
+
globals()[_module_name] = importlib.import_module(f'.{_module_name}', package=__name__)
|
23
|
+
except ImportError:
|
24
|
+
pass
|
25
|
+
|
26
|
+
__all__ = []
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
|
-
#exonware/xwnode/src/exonware/xwnode/
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/monitoring/metrics.py
|
3
3
|
"""
|
4
4
|
Strategy Metrics and Statistics
|
5
5
|
|
@@ -9,7 +9,7 @@ memory usage, and optimization recommendations.
|
|
9
9
|
Company: eXonware.com
|
10
10
|
Author: Eng. Muhammad AlShehri
|
11
11
|
Email: connect@exonware.com
|
12
|
-
Version: 0.0.1.
|
12
|
+
Version: 0.0.1.14
|
13
13
|
Generation Date: 07-Sep-2025
|
14
14
|
"""
|
15
15
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
|
-
#exonware/xwnode/src/exonware/xwnode/
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/monitoring/pattern_detector.py
|
3
3
|
"""
|
4
4
|
Data Pattern Detector for Strategy Selection
|
5
5
|
|
@@ -10,7 +10,7 @@ selection with sophisticated heuristics.
|
|
10
10
|
Company: eXonware.com
|
11
11
|
Author: Eng. Muhammad AlShehri
|
12
12
|
Email: connect@exonware.com
|
13
|
-
Version: 0.0.1.
|
13
|
+
Version: 0.0.1.14
|
14
14
|
Generation Date: 07-Sep-2025
|
15
15
|
"""
|
16
16
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
|
-
#exonware/xwnode/src/exonware/xwnode/
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/monitoring/performance_monitor.py
|
3
3
|
"""
|
4
4
|
Strategy Performance Monitor
|
5
5
|
|
@@ -9,7 +9,7 @@ This enables data-driven strategy selection and performance tuning.
|
|
9
9
|
Company: eXonware.com
|
10
10
|
Author: Eng. Muhammad AlShehri
|
11
11
|
Email: connect@exonware.com
|
12
|
-
Version: 0.0.1.
|
12
|
+
Version: 0.0.1.14
|
13
13
|
Generation Date: 07-Sep-2025
|
14
14
|
"""
|
15
15
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/patterns/__init__.py
|
3
|
+
|
4
|
+
Patterns module for xwnode.
|
5
|
+
|
6
|
+
Company: eXonware.com
|
7
|
+
Author: Eng. Muhammad AlShehri
|
8
|
+
Email: connect@exonware.com
|
9
|
+
Version: 0.0.1.14
|
10
|
+
"""
|
11
|
+
|
12
|
+
# Import and export main components
|
13
|
+
from pathlib import Path
|
14
|
+
import importlib
|
15
|
+
|
16
|
+
# Auto-discover and import all modules
|
17
|
+
_current_dir = Path(__file__).parent
|
18
|
+
for _file in _current_dir.glob('*.py'):
|
19
|
+
if _file.name != '__init__.py' and not _file.name.startswith('_'):
|
20
|
+
_module_name = _file.stem
|
21
|
+
try:
|
22
|
+
globals()[_module_name] = importlib.import_module(f'.{_module_name}', package=__name__)
|
23
|
+
except ImportError:
|
24
|
+
pass
|
25
|
+
|
26
|
+
__all__ = []
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
|
-
#exonware/xwnode/src/exonware/xwnode/
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/patterns/flyweight.py
|
3
3
|
"""
|
4
4
|
Strategy Flyweight Pattern Implementation
|
5
5
|
|
@@ -10,7 +10,7 @@ configuration, which is especially important for high-throughput applications.
|
|
10
10
|
Company: eXonware.com
|
11
11
|
Author: Eng. Muhammad AlShehri
|
12
12
|
Email: connect@exonware.com
|
13
|
-
Version: 0.0.1.
|
13
|
+
Version: 0.0.1.14
|
14
14
|
Generation Date: 07-Sep-2025
|
15
15
|
"""
|
16
16
|
|
@@ -24,8 +24,8 @@ from exonware.xwsystem import get_logger
|
|
24
24
|
logger = get_logger(__name__)
|
25
25
|
|
26
26
|
from ..types import NodeMode, EdgeMode, NodeTrait, EdgeTrait
|
27
|
-
from
|
28
|
-
from
|
27
|
+
from ...nodes.strategies.base import ANodeStrategy
|
28
|
+
from ...edges.strategies.base import AEdgeStrategy
|
29
29
|
|
30
30
|
|
31
31
|
T = TypeVar('T', bound=Union[ANodeStrategy, AEdgeStrategy])
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"""
|
2
|
-
#exonware/xwnode/src/exonware/xwnode/
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/patterns/registry.py
|
3
3
|
|
4
4
|
Strategy Registry
|
5
5
|
|
@@ -61,46 +61,46 @@ class StrategyRegistry:
|
|
61
61
|
from .impls.edge_weighted_graph import xWeightedGraphStrategy
|
62
62
|
|
63
63
|
# Import new strategy implementations
|
64
|
-
from
|
65
|
-
from
|
66
|
-
from
|
67
|
-
from
|
68
|
-
from
|
69
|
-
from
|
70
|
-
from
|
71
|
-
from
|
72
|
-
from
|
73
|
-
from
|
74
|
-
from
|
75
|
-
from
|
76
|
-
from
|
77
|
-
from
|
78
|
-
from
|
79
|
-
from
|
80
|
-
from
|
81
|
-
from
|
82
|
-
from
|
83
|
-
from
|
84
|
-
from
|
85
|
-
from
|
86
|
-
from
|
87
|
-
from
|
88
|
-
from
|
89
|
-
from
|
90
|
-
from
|
91
|
-
from
|
92
|
-
from
|
93
|
-
from
|
94
|
-
from
|
95
|
-
from
|
96
|
-
from
|
64
|
+
from ...nodes.strategies.node_hash_map import xHashMapStrategy
|
65
|
+
from ...nodes.strategies.node_array_list import xArrayListStrategy
|
66
|
+
from ...nodes.strategies.node_trie import xTrieStrategy
|
67
|
+
from ...nodes.strategies.node_heap import xHeapStrategy
|
68
|
+
from ...nodes.strategies.node_btree import xBTreeStrategy
|
69
|
+
from ...nodes.strategies.node_union_find import xUnionFindStrategy
|
70
|
+
from ...nodes.strategies.node_segment_tree import xSegmentTreeStrategy
|
71
|
+
from ...nodes.strategies.node_lsm_tree import xLSMTreeStrategy
|
72
|
+
from ...nodes.strategies.node_fenwick_tree import xFenwickTreeStrategy
|
73
|
+
from ...nodes.strategies.node_set_hash import xSetHashStrategy
|
74
|
+
from ...nodes.strategies.node_bloom_filter import xBloomFilterStrategy
|
75
|
+
from ...nodes.strategies.node_cuckoo_hash import xCuckooHashStrategy
|
76
|
+
from ...nodes.strategies.node_bitmap import xBitmapStrategy
|
77
|
+
from ...nodes.strategies.node_roaring_bitmap import xRoaringBitmapStrategy
|
78
|
+
from ...nodes.strategies.node_suffix_array import xSuffixArrayStrategy
|
79
|
+
from ...nodes.strategies.node_aho_corasick import xAhoCorasickStrategy
|
80
|
+
from ...nodes.strategies.node_count_min_sketch import xCountMinSketchStrategy
|
81
|
+
from ...nodes.strategies.node_hyperloglog import xHyperLogLogStrategy
|
82
|
+
from ...nodes.strategies.node_set_tree import xSetTreeStrategy
|
83
|
+
from ...nodes.strategies.node_linked_list import xLinkedListStrategy
|
84
|
+
from ...nodes.strategies.node_ordered_map import xOrderedMapStrategy
|
85
|
+
from ...nodes.strategies.node_radix_trie import xRadixTrieStrategy
|
86
|
+
from ...nodes.strategies.node_patricia import xPatriciaStrategy
|
87
|
+
from ...nodes.strategies.node_b_plus_tree import xBPlusTreeStrategy
|
88
|
+
from ...nodes.strategies.node_persistent_tree import xPersistentTreeStrategy
|
89
|
+
from ...nodes.strategies.node_cow_tree import xCOWTreeStrategy
|
90
|
+
from ...nodes.strategies.node_skip_list import xSkipListStrategy
|
91
|
+
from ...nodes.strategies.node_red_black_tree import xRedBlackTreeStrategy
|
92
|
+
from ...nodes.strategies.node_avl_tree import xAVLTreeStrategy
|
93
|
+
from ...nodes.strategies.node_treap import xTreapStrategy
|
94
|
+
from ...nodes.strategies.node_splay_tree import xSplayTreeStrategy
|
95
|
+
from ...nodes.strategies.node_ordered_map_balanced import xOrderedMapBalancedStrategy
|
96
|
+
from ...nodes.strategies.node_bitset_dynamic import xBitsetDynamicStrategy
|
97
97
|
from .impls.edge_block_adj_matrix import xBlockAdjMatrixStrategy
|
98
98
|
|
99
99
|
# Import data interchange optimized strategy
|
100
|
-
from
|
100
|
+
from ...nodes.strategies.node_xdata_optimized import DataInterchangeOptimizedStrategy
|
101
101
|
|
102
102
|
# Register tree-graph hybrid strategies
|
103
|
-
from
|
103
|
+
from ...nodes.strategies.node_tree_graph_hybrid import TreeGraphHybridStrategy
|
104
104
|
self.register_node_strategy(NodeMode.TREE_GRAPH_HYBRID, TreeGraphHybridStrategy)
|
105
105
|
|
106
106
|
# Register edge strategies
|
@@ -169,87 +169,84 @@ class StrategyRegistry:
|
|
169
169
|
def _register_default_query_strategies(self):
|
170
170
|
"""Register default query strategy implementations."""
|
171
171
|
# Import query strategies
|
172
|
-
from
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
except ImportError as e:
|
246
|
-
logger.warning(f"⚠️ Could not register default query strategies: {e}")
|
172
|
+
from ...queries.strategies.sql import SQLStrategy
|
173
|
+
from ...queries.strategies.graphql import GraphQLStrategy
|
174
|
+
from ...queries.strategies.cypher import CypherStrategy
|
175
|
+
from ...queries.strategies.sparql import SPARQLStrategy
|
176
|
+
from ...queries.strategies.json_query import JSONQueryStrategy
|
177
|
+
from ...queries.strategies.xml_query import XMLQueryStrategy
|
178
|
+
from ...queries.strategies.xpath import XPathStrategy
|
179
|
+
from ...queries.strategies.xquery import XQueryStrategy
|
180
|
+
from ...queries.strategies.jq import JQStrategy
|
181
|
+
from ...queries.strategies.jmespath import JMESPathStrategy
|
182
|
+
from ...queries.strategies.jsoniq import JSONiqStrategy
|
183
|
+
from ...queries.strategies.gremlin import GremlinStrategy
|
184
|
+
from ...queries.strategies.elastic_dsl import ElasticDSLStrategy
|
185
|
+
from ...queries.strategies.eql import EQLStrategy
|
186
|
+
from ...queries.strategies.flux import FluxStrategy
|
187
|
+
from ...queries.strategies.promql import PromQLStrategy
|
188
|
+
from ...queries.strategies.logql import LogQLStrategy
|
189
|
+
# from ...queries.strategies.spl import SPLStrategy # TODO: Implement SPL strategy
|
190
|
+
from ...queries.strategies.kql import KQLStrategy
|
191
|
+
from ...queries.strategies.cql import CQLStrategy
|
192
|
+
from ...queries.strategies.n1ql import N1QLStrategy
|
193
|
+
from ...queries.strategies.hiveql import HiveQLStrategy
|
194
|
+
from ...queries.strategies.pig import PigStrategy
|
195
|
+
from ...queries.strategies.mql import MQLStrategy
|
196
|
+
from ...queries.strategies.partiql import PartiQLStrategy
|
197
|
+
from ...queries.strategies.linq import LINQStrategy
|
198
|
+
from ...queries.strategies.hql import HQLStrategy
|
199
|
+
from ...queries.strategies.datalog import DatalogStrategy
|
200
|
+
# from ...queries.strategies.ksql import KSQLStrategy # TODO: Implement KSQL strategy
|
201
|
+
from ...queries.strategies.gql import GQLStrategy
|
202
|
+
# from ...queries.strategies.trino_sql import TrinoSQLStrategy # TODO: Implement TrinoSQL strategy
|
203
|
+
# from ...queries.strategies.bigquery_sql import BigQuerySQLStrategy # TODO: Implement BigQuerySQL strategy
|
204
|
+
# from ...queries.strategies.snowflake_sql import SnowflakeSQLStrategy # TODO: Implement SnowflakeSQL strategy
|
205
|
+
# from ...queries.strategies.lucene import LuceneStrategy # TODO: Implement Lucene strategy
|
206
|
+
|
207
|
+
# Register query strategies
|
208
|
+
self.register_query_strategy("SQL", SQLStrategy)
|
209
|
+
self.register_query_strategy("GRAPHQL", GraphQLStrategy)
|
210
|
+
self.register_query_strategy("CYPHER", CypherStrategy)
|
211
|
+
self.register_query_strategy("SPARQL", SPARQLStrategy)
|
212
|
+
self.register_query_strategy("JSON_QUERY", JSONQueryStrategy)
|
213
|
+
self.register_query_strategy("XML_QUERY", XMLQueryStrategy)
|
214
|
+
self.register_query_strategy("XPATH", XPathStrategy)
|
215
|
+
self.register_query_strategy("XQUERY", XQueryStrategy)
|
216
|
+
self.register_query_strategy("JQ", JQStrategy)
|
217
|
+
self.register_query_strategy("JMESPATH", JMESPathStrategy)
|
218
|
+
self.register_query_strategy("JSONIQ", JSONiqStrategy)
|
219
|
+
self.register_query_strategy("GREMLIN", GremlinStrategy)
|
220
|
+
self.register_query_strategy("ELASTIC_DSL", ElasticDSLStrategy)
|
221
|
+
self.register_query_strategy("EQL", EQLStrategy)
|
222
|
+
self.register_query_strategy("FLUX", FluxStrategy)
|
223
|
+
self.register_query_strategy("PROMQL", PromQLStrategy)
|
224
|
+
self.register_query_strategy("LOGQL", LogQLStrategy)
|
225
|
+
# self.register_query_strategy("SPL", SPLStrategy) # TODO: Implement SPL strategy
|
226
|
+
self.register_query_strategy("KQL", KQLStrategy)
|
227
|
+
self.register_query_strategy("CQL", CQLStrategy)
|
228
|
+
self.register_query_strategy("N1QL", N1QLStrategy)
|
229
|
+
self.register_query_strategy("HIVEQL", HiveQLStrategy)
|
230
|
+
self.register_query_strategy("PIG", PigStrategy)
|
231
|
+
self.register_query_strategy("MQL", MQLStrategy)
|
232
|
+
self.register_query_strategy("PARTIQL", PartiQLStrategy)
|
233
|
+
self.register_query_strategy("LINQ", LINQStrategy)
|
234
|
+
self.register_query_strategy("HQL", HQLStrategy)
|
235
|
+
self.register_query_strategy("DATALOG", DatalogStrategy)
|
236
|
+
# self.register_query_strategy("KSQL", KSQLStrategy) # TODO: Implement KSQL strategy
|
237
|
+
self.register_query_strategy("GQL", GQLStrategy)
|
238
|
+
# self.register_query_strategy("TRINO_SQL", TrinoSQLStrategy) # TODO: Implement TrinoSQL strategy
|
239
|
+
# self.register_query_strategy("BIGQUERY_SQL", BigQuerySQLStrategy) # TODO: Implement BigQuerySQL strategy
|
240
|
+
# self.register_query_strategy("SNOWFLAKE_SQL", SnowflakeSQLStrategy) # TODO: Implement SnowflakeSQL strategy
|
241
|
+
# self.register_query_strategy("LUCENE", LuceneStrategy) # TODO: Implement Lucene strategy
|
242
|
+
|
243
|
+
logger.info("✅ Registered default query strategies")
|
247
244
|
|
248
245
|
def register_data_interchange_optimized_factory(self):
|
249
246
|
"""Register special factory for DATA_INTERCHANGE_OPTIMIZED preset handling."""
|
250
247
|
# We'll store this in a special attribute for the strategy manager to use
|
251
248
|
def data_interchange_factory(**options):
|
252
|
-
from
|
249
|
+
from ...nodes.strategies.node_xdata_optimized import DataInterchangeOptimizedStrategy
|
253
250
|
return DataInterchangeOptimizedStrategy(NodeTrait.INDEXED, **options)
|
254
251
|
|
255
252
|
self._data_interchange_optimized_factory = data_interchange_factory
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/common/utils/__init__.py
|
3
|
+
|
4
|
+
Utils module for xwnode.
|
5
|
+
|
6
|
+
Company: eXonware.com
|
7
|
+
Author: Eng. Muhammad AlShehri
|
8
|
+
Email: connect@exonware.com
|
9
|
+
Version: 0.0.1.14
|
10
|
+
"""
|
11
|
+
|
12
|
+
# Import and export main components
|
13
|
+
from pathlib import Path
|
14
|
+
import importlib
|
15
|
+
|
16
|
+
# Auto-discover and import all modules
|
17
|
+
_current_dir = Path(__file__).parent
|
18
|
+
for _file in _current_dir.glob('*.py'):
|
19
|
+
if _file.name != '__init__.py' and not _file.name.startswith('_'):
|
20
|
+
_module_name = _file.stem
|
21
|
+
try:
|
22
|
+
globals()[_module_name] = importlib.import_module(f'.{_module_name}', package=__name__)
|
23
|
+
except ImportError:
|
24
|
+
pass
|
25
|
+
|
26
|
+
__all__ = []
|
@@ -11,7 +11,7 @@ This module defines the abstract base classes for all edge strategy implementati
|
|
11
11
|
Company: eXonware.com
|
12
12
|
Author: Eng. Muhammad AlShehri
|
13
13
|
Email: connect@exonware.com
|
14
|
-
Version: 0.0.1.
|
14
|
+
Version: 0.0.1.14
|
15
15
|
Generation Date: January 2, 2025
|
16
16
|
"""
|
17
17
|
|
@@ -22,8 +22,8 @@ from ...contracts import iEdgeStrategy
|
|
22
22
|
from ...errors import XWNodeTypeError, XWNodeValueError
|
23
23
|
|
24
24
|
|
25
|
-
class AEdgeStrategy(
|
26
|
-
"""Base strategy for all edge implementations."""
|
25
|
+
class AEdgeStrategy(iEdgeStrategy):
|
26
|
+
"""Base strategy for all edge implementations - extends iEdgeStrategy interface."""
|
27
27
|
|
28
28
|
def __init__(self, **options):
|
29
29
|
"""Initialize edge strategy."""
|
exonware/xwnode/facade.py
CHANGED
@@ -9,7 +9,7 @@ a clean, intuitive interface.
|
|
9
9
|
Company: eXonware.com
|
10
10
|
Author: Eng. Muhammad AlShehri
|
11
11
|
Email: connect@exonware.com
|
12
|
-
Version: 0.0.1.
|
12
|
+
Version: 0.0.1.14
|
13
13
|
Generation Date: 07-Sep-2025
|
14
14
|
"""
|
15
15
|
|
@@ -19,7 +19,8 @@ from typing import Any, Dict, List, Optional, Union, Iterator
|
|
19
19
|
from .base import XWNodeBase
|
20
20
|
from .config import get_config, set_config
|
21
21
|
from .errors import XWNodeError, XWNodeTypeError, XWNodeValueError
|
22
|
-
from .
|
22
|
+
from .common.management.manager import StrategyManager
|
23
|
+
from .common.patterns.registry import get_registry
|
23
24
|
|
24
25
|
logger = logging.getLogger(__name__)
|
25
26
|
|
@@ -57,7 +58,7 @@ class XWNode(XWNodeBase):
|
|
57
58
|
except Exception as e:
|
58
59
|
logger.warning(f"Failed to setup strategy: {e}, using default")
|
59
60
|
# Create a simple strategy as fallback
|
60
|
-
from .
|
61
|
+
from .common.utils.simple import SimpleNodeStrategy
|
61
62
|
self._strategy = SimpleNodeStrategy.create_from_data(self._data or {})
|
62
63
|
|
63
64
|
# ============================================================================
|
@@ -6,13 +6,14 @@ Implements graph operations using adjacency list representation.
|
|
6
6
|
Company: eXonware.com
|
7
7
|
Author: Eng. Muhammad AlShehri
|
8
8
|
Email: connect@exonware.com
|
9
|
-
Version: 0.0.1.
|
9
|
+
Version: 0.0.1.14
|
10
10
|
Generation Date: 07-Sep-2025
|
11
11
|
"""
|
12
12
|
|
13
13
|
from typing import Any, Iterator, List, Optional, Dict, Union, Set, Tuple
|
14
14
|
from collections import defaultdict
|
15
15
|
from .base import ANodeGraphStrategy
|
16
|
+
from .contracts import NodeType
|
16
17
|
from ...types import NodeMode, NodeTrait
|
17
18
|
|
18
19
|
|
@@ -21,7 +22,11 @@ class AdjacencyListStrategy(ANodeGraphStrategy):
|
|
21
22
|
Adjacency List node strategy for graph operations.
|
22
23
|
|
23
24
|
Uses adjacency list representation for efficient neighbor queries
|
24
|
-
and edge
|
25
|
+
and edge oper
|
26
|
+
|
27
|
+
# Strategy type classification
|
28
|
+
STRATEGY_TYPE = NodeType.GRAPH
|
29
|
+
ations in sparse graphs.
|
25
30
|
"""
|
26
31
|
|
27
32
|
def __init__(self):
|
@@ -8,6 +8,7 @@ string matching using the Aho-Corasick automaton algorithm.
|
|
8
8
|
from typing import Any, Iterator, List, Dict, Set, Optional, Tuple
|
9
9
|
from collections import deque, defaultdict
|
10
10
|
from .base import ANodeTreeStrategy
|
11
|
+
from .contracts import NodeType
|
11
12
|
from ...types import NodeMode, NodeTrait
|
12
13
|
|
13
14
|
|
@@ -31,7 +32,11 @@ class xAhoCorasickStrategy(ANodeTreeStrategy):
|
|
31
32
|
Aho-Corasick node strategy for multi-pattern string matching.
|
32
33
|
|
33
34
|
Efficiently searches for multiple patterns simultaneously in a text
|
34
|
-
using a finite automaton with failure links
|
35
|
+
using a finite automaton with failure links f
|
36
|
+
|
37
|
+
# Strategy type classification
|
38
|
+
STRATEGY_TYPE = NodeType.TREE
|
39
|
+
or linear-time matching.
|
35
40
|
"""
|
36
41
|
|
37
42
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|