exonware-xwnode 0.0.1.13__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 → queries/strategies}/xwquery.py +1 -1
- 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.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.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.14.dist-info}/WHEEL +0 -0
- {exonware_xwnode-0.0.1.13.dist-info → exonware_xwnode-0.0.1.14.dist-info}/licenses/LICENSE +0 -0
@@ -8,6 +8,7 @@ trees with structural sharing and lock-free concurrency.
|
|
8
8
|
|
9
9
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
10
10
|
from .base import ANodeTreeStrategy
|
11
|
+
from .contracts import NodeType
|
11
12
|
from ...types import NodeMode, NodeTrait
|
12
13
|
|
13
14
|
|
@@ -44,7 +45,11 @@ class PersistentTreeStrategy(ANodeTreeStrategy):
|
|
44
45
|
Persistent tree node strategy for immutable functional trees.
|
45
46
|
|
46
47
|
Provides lock-free concurrency through immutability and structural sharing.
|
47
|
-
Each operation returns a new tree while
|
48
|
+
Each operation returns a new tree while
|
49
|
+
|
50
|
+
# Strategy type classification
|
51
|
+
STRATEGY_TYPE = NodeType.TREE
|
52
|
+
sharing unchanged nodes.
|
48
53
|
"""
|
49
54
|
|
50
55
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -7,6 +7,7 @@ matching with path compression for memory efficiency.
|
|
7
7
|
|
8
8
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
9
9
|
from .base import ANodeTreeStrategy
|
10
|
+
from .contracts import NodeType
|
10
11
|
from ...types import NodeMode, NodeTrait
|
11
12
|
|
12
13
|
|
@@ -30,7 +31,11 @@ class RadixTrieStrategy(ANodeTreeStrategy):
|
|
30
31
|
Radix Trie node strategy for compressed prefix matching.
|
31
32
|
|
32
33
|
Provides memory-efficient string storage with path compression
|
33
|
-
and fast
|
34
|
+
and fast
|
35
|
+
|
36
|
+
# Strategy type classification
|
37
|
+
STRATEGY_TYPE = NodeType.TREE
|
38
|
+
prefix-based operations.
|
34
39
|
"""
|
35
40
|
|
36
41
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -8,6 +8,7 @@ search trees with guaranteed O(log n) height and operations.
|
|
8
8
|
|
9
9
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
10
10
|
from .base import ANodeTreeStrategy
|
11
|
+
from .contracts import NodeType
|
11
12
|
from ...types import NodeMode, NodeTrait
|
12
13
|
|
13
14
|
|
@@ -59,7 +60,11 @@ class RedBlackTreeStrategy(ANodeTreeStrategy):
|
|
59
60
|
Red-black tree node strategy for self-balancing binary search trees.
|
60
61
|
|
61
62
|
Provides guaranteed O(log n) height and operations through color-based
|
62
|
-
|
63
|
+
balanc
|
64
|
+
|
65
|
+
# Strategy type classification
|
66
|
+
STRATEGY_TYPE = NodeType.TREE
|
67
|
+
ing rules and rotations.
|
63
68
|
"""
|
64
69
|
|
65
70
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -9,6 +9,7 @@ from typing import Any, Iterator, List, Dict, Optional, Set, Tuple
|
|
9
9
|
from collections import defaultdict
|
10
10
|
import struct
|
11
11
|
from .base import ANodeMatrixStrategy
|
12
|
+
from .contracts import NodeType
|
12
13
|
from ...types import NodeMode, NodeTrait
|
13
14
|
|
14
15
|
|
@@ -155,7 +156,11 @@ class RoaringBitmapStrategy(ANodeMatrixStrategy):
|
|
155
156
|
|
156
157
|
Uses a hybrid approach with array containers for sparse data
|
157
158
|
and bitmap containers for dense data, providing excellent
|
158
|
-
compression and
|
159
|
+
compression and perf
|
160
|
+
|
161
|
+
# Strategy type classification
|
162
|
+
STRATEGY_TYPE = NodeType.MATRIX
|
163
|
+
ormance characteristics.
|
159
164
|
"""
|
160
165
|
|
161
166
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -7,6 +7,7 @@ and updates with O(log n) complexity.
|
|
7
7
|
|
8
8
|
from typing import Any, Iterator, List, Optional, Callable, Dict, Union
|
9
9
|
from .base import ANodeTreeStrategy
|
10
|
+
from .contracts import NodeType
|
10
11
|
from ...types import NodeMode, NodeTrait
|
11
12
|
|
12
13
|
|
@@ -15,7 +16,11 @@ class SegmentTreeStrategy(ANodeTreeStrategy):
|
|
15
16
|
Segment Tree node strategy for efficient range queries and updates.
|
16
17
|
|
17
18
|
Provides O(log n) range queries and updates for associative operations
|
18
|
-
|
19
|
+
|
20
|
+
|
21
|
+
# Strategy type classification
|
22
|
+
STRATEGY_TYPE = NodeType.TREE
|
23
|
+
like sum, min, max, etc.
|
19
24
|
"""
|
20
25
|
|
21
26
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -19,6 +19,10 @@ class xSetHashStrategy(aNodeStrategy):
|
|
19
19
|
with automatic handling of duplicates and fast set operations.
|
20
20
|
"""
|
21
21
|
|
22
|
+
# Strategy type classification
|
23
|
+
STRATEGY_TYPE = NodeType.MATRIX
|
24
|
+
|
25
|
+
|
22
26
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
23
27
|
"""Initialize the Hash Set strategy."""
|
24
28
|
super().__init__(NodeMode.SET_HASH, traits, **options)
|
@@ -7,6 +7,7 @@ using a balanced binary search tree with efficient range queries.
|
|
7
7
|
|
8
8
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
9
9
|
from .base import ANodeTreeStrategy
|
10
|
+
from .contracts import NodeType
|
10
11
|
from ...types import NodeMode, NodeTrait
|
11
12
|
|
12
13
|
|
@@ -27,7 +28,11 @@ class SetTreeStrategy(ANodeTreeStrategy):
|
|
27
28
|
Tree Set node strategy for ordered set operations.
|
28
29
|
|
29
30
|
Provides efficient ordered set operations with logarithmic complexity
|
30
|
-
for insertions,
|
31
|
+
for insertions, delet
|
32
|
+
|
33
|
+
# Strategy type classification
|
34
|
+
STRATEGY_TYPE = NodeType.TREE
|
35
|
+
ions, and range queries.
|
31
36
|
"""
|
32
37
|
|
33
38
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -9,6 +9,7 @@ with O(log n) expected performance for search, insertion, and deletion.
|
|
9
9
|
import random
|
10
10
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
11
11
|
from .base import ANodeTreeStrategy
|
12
|
+
from .contracts import NodeType
|
12
13
|
from ...types import NodeMode, NodeTrait
|
13
14
|
|
14
15
|
|
@@ -40,7 +41,11 @@ class SkipListStrategy(ANodeTreeStrategy):
|
|
40
41
|
Skip list node strategy for probabilistic data structures.
|
41
42
|
|
42
43
|
Provides O(log n) expected performance for search, insertion, and deletion
|
43
|
-
with simple implementation and good
|
44
|
+
with simple implementation and good concu
|
45
|
+
|
46
|
+
# Strategy type classification
|
47
|
+
STRATEGY_TYPE = NodeType.TREE
|
48
|
+
rrent access properties.
|
44
49
|
"""
|
45
50
|
|
46
51
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -8,6 +8,7 @@ search trees with amortized O(log n) performance.
|
|
8
8
|
|
9
9
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
10
10
|
from .base import ANodeTreeStrategy
|
11
|
+
from .contracts import NodeType
|
11
12
|
from ...types import NodeMode, NodeTrait
|
12
13
|
|
13
14
|
|
@@ -40,7 +41,11 @@ class SplayTreeStrategy(ANodeTreeStrategy):
|
|
40
41
|
Splay tree node strategy for self-adjusting binary search trees.
|
41
42
|
|
42
43
|
Provides amortized O(log n) performance by moving accessed nodes
|
43
|
-
to the root
|
44
|
+
to the root thro
|
45
|
+
|
46
|
+
# Strategy type classification
|
47
|
+
STRATEGY_TYPE = NodeType.TREE
|
48
|
+
ugh splaying operations.
|
44
49
|
"""
|
45
50
|
|
46
51
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -8,6 +8,7 @@ searches and string pattern matching with linear time construction.
|
|
8
8
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
9
9
|
import bisect
|
10
10
|
from .base import ANodeTreeStrategy
|
11
|
+
from .contracts import NodeType
|
11
12
|
from ...types import NodeMode, NodeTrait
|
12
13
|
|
13
14
|
|
@@ -16,7 +17,11 @@ class SuffixArrayStrategy(ANodeTreeStrategy):
|
|
16
17
|
Suffix Array node strategy for efficient string operations.
|
17
18
|
|
18
19
|
Provides fast substring searches, pattern matching, and string analysis
|
19
|
-
with linear space usage and
|
20
|
+
with linear space usage and eff
|
21
|
+
|
22
|
+
# Strategy type classification
|
23
|
+
STRATEGY_TYPE = NodeType.TREE
|
24
|
+
icient query operations.
|
20
25
|
"""
|
21
26
|
|
22
27
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -9,6 +9,7 @@ combining binary search tree and heap properties.
|
|
9
9
|
import random
|
10
10
|
from typing import Any, Iterator, List, Dict, Optional, Tuple
|
11
11
|
from .base import ANodeTreeStrategy
|
12
|
+
from .contracts import NodeType
|
12
13
|
from ...types import NodeMode, NodeTrait
|
13
14
|
|
14
15
|
|
@@ -43,7 +44,11 @@ class TreapStrategy(ANodeTreeStrategy):
|
|
43
44
|
Treap node strategy for randomized balanced trees.
|
44
45
|
|
45
46
|
Combines binary search tree and heap properties with randomized
|
46
|
-
priorities for
|
47
|
+
priorities for
|
48
|
+
|
49
|
+
# Strategy type classification
|
50
|
+
STRATEGY_TYPE = NodeType.TREE
|
51
|
+
self-balancing behavior.
|
47
52
|
"""
|
48
53
|
|
49
54
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -529,6 +529,10 @@ class TreeGraphHybridStrategy(iNodeStrategy):
|
|
529
529
|
- Lazy loading and object pooling
|
530
530
|
"""
|
531
531
|
|
532
|
+
# Strategy type classification
|
533
|
+
STRATEGY_TYPE = NodeType.HYBRID
|
534
|
+
|
535
|
+
|
532
536
|
def __init__(self):
|
533
537
|
"""Initialize the TreeGraphHybrid strategy."""
|
534
538
|
self._root: Optional[TreeGraphNode] = None
|
@@ -6,6 +6,7 @@ This module implements the TRIE strategy for efficient string prefix operations.
|
|
6
6
|
|
7
7
|
from typing import Any, Iterator, Dict, List, Optional
|
8
8
|
from .base import ANodeTreeStrategy
|
9
|
+
from .contracts import NodeType
|
9
10
|
from ...types import NodeMode, NodeTrait
|
10
11
|
from ..utils import (
|
11
12
|
TrieNode,
|
@@ -24,7 +25,11 @@ class TrieStrategy(ANodeTreeStrategy):
|
|
24
25
|
"""
|
25
26
|
Trie node strategy for efficient string prefix operations.
|
26
27
|
|
27
|
-
Optimized for prefix matching,
|
28
|
+
Optimized for prefix matching, autocomplet
|
29
|
+
|
30
|
+
# Strategy type classification
|
31
|
+
STRATEGY_TYPE = NodeType.TREE
|
32
|
+
e, and string searching.
|
28
33
|
"""
|
29
34
|
|
30
35
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -6,6 +6,7 @@ This module implements the UNION_FIND strategy for efficient set operations.
|
|
6
6
|
|
7
7
|
from typing import Any, Iterator, Dict, List, Set
|
8
8
|
from .base import ANodeGraphStrategy
|
9
|
+
from .contracts import NodeType
|
9
10
|
from ...types import NodeMode, NodeTrait
|
10
11
|
from ..utils import (
|
11
12
|
UnionFind,
|
@@ -24,7 +25,11 @@ class UnionFindStrategy(ANodeGraphStrategy):
|
|
24
25
|
"""
|
25
26
|
Union-Find node strategy for efficient set operations.
|
26
27
|
|
27
|
-
Optimized for union, find, and connected
|
28
|
+
Optimized for union, find, and connected oper
|
29
|
+
|
30
|
+
# Strategy type classification
|
31
|
+
STRATEGY_TYPE = NodeType.GRAPH
|
32
|
+
ations on disjoint sets.
|
28
33
|
"""
|
29
34
|
|
30
35
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -36,6 +36,10 @@ class DataInterchangeOptimizedStrategy(aNodeStrategy):
|
|
36
36
|
- Zero graph/edge overhead
|
37
37
|
"""
|
38
38
|
|
39
|
+
# Strategy type classification
|
40
|
+
STRATEGY_TYPE = NodeType.HYBRID
|
41
|
+
|
42
|
+
|
39
43
|
__slots__ = (
|
40
44
|
'_data', '_size', '_hash_cache', '_frozen', '_cow_enabled',
|
41
45
|
'_pool_ref', '_creation_time', '_access_count', 'mode', 'traits', 'options'
|
@@ -6,13 +6,14 @@ Implements a priority queue using Python's heapq for efficient priority-based op
|
|
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, Optional, Dict, Union, Tuple
|
14
14
|
import heapq
|
15
15
|
from .base import ANodeLinearStrategy
|
16
|
+
from .contracts import NodeType
|
16
17
|
from ...types import NodeMode, NodeTrait
|
17
18
|
|
18
19
|
|
@@ -21,7 +22,11 @@ class PriorityQueueStrategy(ANodeLinearStrategy):
|
|
21
22
|
Priority Queue node strategy for priority-based operations.
|
22
23
|
|
23
24
|
Uses a binary heap for efficient insertion and extraction of
|
24
|
-
highest priority elements, ideal for
|
25
|
+
highest priority elements, ideal for alg
|
26
|
+
|
27
|
+
# Strategy type classification
|
28
|
+
STRATEGY_TYPE = NodeType.LINEAR
|
29
|
+
orithms like Dijkstra's.
|
25
30
|
"""
|
26
31
|
|
27
32
|
def __init__(self):
|
@@ -6,13 +6,14 @@ Implements a FIFO (First In, First Out) data structure using Python's deque.
|
|
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, Optional, Dict, Union
|
14
14
|
from collections import deque
|
15
15
|
from .base import ANodeLinearStrategy
|
16
|
+
from .contracts import NodeType
|
16
17
|
from ...types import NodeMode, NodeTrait
|
17
18
|
|
18
19
|
|
@@ -21,7 +22,11 @@ class QueueStrategy(ANodeLinearStrategy):
|
|
21
22
|
Queue node strategy for FIFO (First In, First Out) operations.
|
22
23
|
|
23
24
|
Provides O(1) enqueue and dequeue operations with efficient memory usage
|
24
|
-
for queue-based algorithms
|
25
|
+
for queue-based algorithms a
|
26
|
+
|
27
|
+
# Strategy type classification
|
28
|
+
STRATEGY_TYPE = NodeType.LINEAR
|
29
|
+
nd breadth-first search.
|
25
30
|
"""
|
26
31
|
|
27
32
|
def __init__(self):
|
@@ -6,12 +6,13 @@ Implements a sparse matrix using coordinate format (COO) for memory efficiency.
|
|
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, Tuple
|
14
14
|
from .base import ANodeMatrixStrategy
|
15
|
+
from .contracts import NodeType
|
15
16
|
from ...types import NodeMode, NodeTrait
|
16
17
|
|
17
18
|
|
@@ -20,7 +21,11 @@ class SparseMatrixStrategy(ANodeMatrixStrategy):
|
|
20
21
|
Sparse Matrix node strategy for memory-efficient matrix operations.
|
21
22
|
|
22
23
|
Uses coordinate format (COO) to store only non-zero elements,
|
23
|
-
providing excellent memory
|
24
|
+
providing excellent memory efficie
|
25
|
+
|
26
|
+
# Strategy type classification
|
27
|
+
STRATEGY_TYPE = NodeType.MATRIX
|
28
|
+
ncy for sparse matrices.
|
24
29
|
"""
|
25
30
|
|
26
31
|
def __init__(self):
|
@@ -6,12 +6,13 @@ Implements a LIFO (Last In, First Out) data structure using Python's list.
|
|
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
|
14
14
|
from .base import ANodeLinearStrategy
|
15
|
+
from .contracts import NodeType
|
15
16
|
from ...types import NodeMode, NodeTrait
|
16
17
|
|
17
18
|
|
@@ -20,7 +21,11 @@ class StackStrategy(ANodeLinearStrategy):
|
|
20
21
|
Stack node strategy for LIFO (Last In, First Out) operations.
|
21
22
|
|
22
23
|
Provides O(1) push and pop operations with efficient memory usage
|
23
|
-
for stack-based algorithms and
|
24
|
+
for stack-based algorithms and recurs
|
25
|
+
|
26
|
+
# Strategy type classification
|
27
|
+
STRATEGY_TYPE = NodeType.LINEAR
|
28
|
+
ive function simulation.
|
24
29
|
"""
|
25
30
|
|
26
31
|
def __init__(self):
|
@@ -6,6 +6,7 @@ This module implements the TRIE strategy for efficient string prefix operations.
|
|
6
6
|
|
7
7
|
from typing import Any, Iterator, Dict, List, Optional
|
8
8
|
from .base import ANodeTreeStrategy
|
9
|
+
from .contracts import NodeType
|
9
10
|
from ...types import NodeMode, NodeTrait
|
10
11
|
|
11
12
|
|
@@ -22,7 +23,11 @@ class xTrieStrategy(ANodeTreeStrategy):
|
|
22
23
|
"""
|
23
24
|
Trie node strategy for efficient string prefix operations.
|
24
25
|
|
25
|
-
Optimized for prefix matching,
|
26
|
+
Optimized for prefix matching, autocomplet
|
27
|
+
|
28
|
+
# Strategy type classification
|
29
|
+
STRATEGY_TYPE = NodeType.TREE
|
30
|
+
e, and string searching.
|
26
31
|
"""
|
27
32
|
|
28
33
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -6,6 +6,7 @@ This module implements the UNION_FIND strategy for efficient set operations.
|
|
6
6
|
|
7
7
|
from typing import Any, Iterator, Dict, List, Set
|
8
8
|
from .base import ANodeGraphStrategy
|
9
|
+
from .contracts import NodeType
|
9
10
|
from ...types import NodeMode, NodeTrait
|
10
11
|
|
11
12
|
|
@@ -80,7 +81,11 @@ class xUnionFindStrategy(ANodeGraphStrategy):
|
|
80
81
|
"""
|
81
82
|
Union-Find node strategy for efficient set operations.
|
82
83
|
|
83
|
-
Optimized for union, find, and connected
|
84
|
+
Optimized for union, find, and connected oper
|
85
|
+
|
86
|
+
# Strategy type classification
|
87
|
+
STRATEGY_TYPE = NodeType.GRAPH
|
88
|
+
ations on disjoint sets.
|
84
89
|
"""
|
85
90
|
|
86
91
|
def __init__(self, traits: NodeTrait = NodeTrait.NONE, **options):
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/__init__.py
|
3
|
+
|
4
|
+
Query Operation Executors
|
5
|
+
|
6
|
+
This package implements the execution layer for 50 XWQuery Script operations.
|
7
|
+
|
8
|
+
Company: eXonware.com
|
9
|
+
Author: Eng. Muhammad AlShehri
|
10
|
+
Email: connect@exonware.com
|
11
|
+
Version: 0.0.1.14
|
12
|
+
Generation Date: 08-Oct-2025
|
13
|
+
"""
|
14
|
+
|
15
|
+
from .contracts import (
|
16
|
+
IOperationExecutor,
|
17
|
+
Action,
|
18
|
+
ExecutionContext,
|
19
|
+
ExecutionResult
|
20
|
+
)
|
21
|
+
from .types import OperationCapability, OperationType, ExecutionStatus
|
22
|
+
from .errors import ExecutorError, OperationExecutionError, ValidationError, UnsupportedOperationError
|
23
|
+
from .base import AOperationExecutor
|
24
|
+
from .registry import OperationRegistry, get_operation_registry, register_operation
|
25
|
+
|
26
|
+
__all__ = [
|
27
|
+
# Contracts
|
28
|
+
'IOperationExecutor',
|
29
|
+
'Action',
|
30
|
+
'ExecutionContext',
|
31
|
+
'ExecutionResult',
|
32
|
+
# Types
|
33
|
+
'OperationCapability',
|
34
|
+
'OperationType',
|
35
|
+
'ExecutionStatus',
|
36
|
+
# Errors
|
37
|
+
'ExecutorError',
|
38
|
+
'OperationExecutionError',
|
39
|
+
'ValidationError',
|
40
|
+
'UnsupportedOperationError',
|
41
|
+
# Base
|
42
|
+
'AOperationExecutor',
|
43
|
+
# Registry
|
44
|
+
'OperationRegistry',
|
45
|
+
'get_operation_registry',
|
46
|
+
'register_operation',
|
47
|
+
]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"""Advanced operation executors."""
|
2
|
+
|
3
|
+
from .join_executor import JoinExecutor
|
4
|
+
from .union_executor import UnionExecutor
|
5
|
+
from .with_cte_executor import WithCteExecutor
|
6
|
+
from .aggregate_executor import AggregateExecutor
|
7
|
+
from .foreach_executor import ForeachExecutor
|
8
|
+
from .let_executor import LetExecutor
|
9
|
+
from .for_loop_executor import ForLoopExecutor
|
10
|
+
from .window_executor import WindowExecutor
|
11
|
+
from .describe_executor import DescribeExecutor
|
12
|
+
from .construct_executor import ConstructExecutor
|
13
|
+
from .ask_executor import AskExecutor
|
14
|
+
from .subscribe_executor import SubscribeExecutor
|
15
|
+
from .subscription_executor import SubscriptionExecutor
|
16
|
+
from .mutation_executor import MutationExecutor
|
17
|
+
from .pipe_executor import PipeExecutor
|
18
|
+
from .options_executor import OptionsExecutor
|
19
|
+
|
20
|
+
__all__ = [
|
21
|
+
'JoinExecutor',
|
22
|
+
'UnionExecutor',
|
23
|
+
'WithCteExecutor',
|
24
|
+
'AggregateExecutor',
|
25
|
+
'ForeachExecutor',
|
26
|
+
'LetExecutor',
|
27
|
+
'ForLoopExecutor',
|
28
|
+
'WindowExecutor',
|
29
|
+
'DescribeExecutor',
|
30
|
+
'ConstructExecutor',
|
31
|
+
'AskExecutor',
|
32
|
+
'SubscribeExecutor',
|
33
|
+
'SubscriptionExecutor',
|
34
|
+
'MutationExecutor',
|
35
|
+
'PipeExecutor',
|
36
|
+
'OptionsExecutor',
|
37
|
+
]
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/advanced/aggregate_executor.py
|
4
|
+
|
5
|
+
AGGREGATE Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.14
|
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 AggregateExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
AGGREGATE operation executor.
|
22
|
+
|
23
|
+
Window aggregation operations
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: AGGREGATION
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "AGGREGATE"
|
30
|
+
OPERATION_TYPE = OperationType.AGGREGATION
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute AGGREGATE operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_aggregate(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_aggregate(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute aggregate logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'AGGREGATE executed', 'params': params}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
#exonware/xwnode/src/exonware/xwnode/queries/executors/advanced/ask_executor.py
|
4
|
+
|
5
|
+
ASK Executor
|
6
|
+
|
7
|
+
Company: eXonware.com
|
8
|
+
Author: Eng. Muhammad AlShehri
|
9
|
+
Email: connect@exonware.com
|
10
|
+
Version: 0.0.1.14
|
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 AskExecutor(AUniversalOperationExecutor):
|
20
|
+
"""
|
21
|
+
ASK operation executor.
|
22
|
+
|
23
|
+
Boolean query (yes/no result)
|
24
|
+
|
25
|
+
Capability: Universal
|
26
|
+
Operation Type: ADVANCED
|
27
|
+
"""
|
28
|
+
|
29
|
+
OPERATION_NAME = "ASK"
|
30
|
+
OPERATION_TYPE = OperationType.ADVANCED
|
31
|
+
SUPPORTED_NODE_TYPES = [] # Universal
|
32
|
+
|
33
|
+
def _do_execute(self, action: Action, context: ExecutionContext) -> ExecutionResult:
|
34
|
+
"""Execute ASK operation."""
|
35
|
+
params = action.params
|
36
|
+
node = context.node
|
37
|
+
|
38
|
+
result_data = self._execute_ask(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_ask(self, node: Any, params: Dict, context: ExecutionContext) -> Dict:
|
48
|
+
"""Execute ask logic."""
|
49
|
+
# Implementation here
|
50
|
+
return {'result': 'ASK executed', 'params': params}
|