rusty-haystack 0.5.3__tar.gz → 0.5.4__tar.gz
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.
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/Cargo.lock +6 -5
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/Cargo.toml +1 -1
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/PKG-INFO +1 -1
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/Cargo.toml +1 -1
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/lib.rs +1 -1
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/Cargo.toml +1 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/zinc/encoder.rs +23 -24
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/adjacency.rs +15 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/entity_graph.rs +134 -93
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/query_planner.rs +38 -14
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/value_index.rs +16 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/Cargo.toml +2 -2
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/benches/benchmarks.rs +1 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/benches/federation.rs +1 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/connector.rs +103 -66
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/about.rs +2 -2
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/read.rs +21 -31
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/Cargo.toml +3 -3
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/README.md +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/auth.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/client.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/error.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/tls.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/transport/http.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/transport/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-client/src/transport/ws.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/benches/benchmarks.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/defs.trio +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/tz_map.txt +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/units.txt +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.attrs.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.equips.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.examples.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.points.elec.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.points.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.protocols.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/ph.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/sys.api.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/sys.comp.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/sys.files.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/sys.template.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/data/xeto/sys.xeto +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/auth.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/csv.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/json/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/json/v3.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/json/v4.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/rdf.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/shared.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/trio/encoder.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/trio/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/trio/parser.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/zinc/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/codecs/zinc/parser.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/data/dict.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/data/grid.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/data/list.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/data/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/filter/ast.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/filter/eval.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/filter/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/filter/parser.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/bitmap.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/changelog.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/columnar.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/csr.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/graph/shared.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/coord.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/datetime.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/kind.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/number.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/ref_.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/singletons.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/symbol.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/tz.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/units.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/uri.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/kinds/xstr.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/lib.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/conjunct.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/def.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/lib.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/namespace.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/taxonomy.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/trio_loader.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/ontology/validation.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/ast.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/bundled.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/export.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/fitting.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/lexer.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/loader.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/parser.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/resolver.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/src/xeto/spec.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/tests/e2e.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/tests/graph_integration.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-core/tests/ontology_integration.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/actions.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/app.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/auth/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/auth/users.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/content.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/demo.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/error.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/federation.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/his_store.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/lib.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/changes.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/data.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/defs.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/federation.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/formats.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/graph.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/his.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/invoke.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/libs.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/mod.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/nav.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/ops_handler.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/point_write.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/rdf.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/system.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ops/watch.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/state.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/src/ws.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/haystack-server/tests/federation_integration.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/pyproject.toml +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/README.md +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/rusty_haystack.pyi +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/auth.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/client.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/codecs.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/convert.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/data.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/exceptions.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/filter.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/graph.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/kinds.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/lib.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/ontology.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/src/server.rs +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/__init__.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/conftest.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_auth.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_codecs.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_data.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_exceptions.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_filter.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_graph.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_kinds.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_ontology.py +0 -0
- {rusty_haystack-0.5.3 → rusty_haystack-0.5.4}/rusty-haystack/tests/test_server.py +0 -0
|
@@ -2077,7 +2077,7 @@ dependencies = [
|
|
|
2077
2077
|
|
|
2078
2078
|
[[package]]
|
|
2079
2079
|
name = "rusty-haystack"
|
|
2080
|
-
version = "0.5.
|
|
2080
|
+
version = "0.5.4"
|
|
2081
2081
|
dependencies = [
|
|
2082
2082
|
"chrono",
|
|
2083
2083
|
"pyo3",
|
|
@@ -2089,7 +2089,7 @@ dependencies = [
|
|
|
2089
2089
|
|
|
2090
2090
|
[[package]]
|
|
2091
2091
|
name = "rusty-haystack-cli"
|
|
2092
|
-
version = "0.5.
|
|
2092
|
+
version = "0.5.4"
|
|
2093
2093
|
dependencies = [
|
|
2094
2094
|
"clap",
|
|
2095
2095
|
"env_logger",
|
|
@@ -2103,7 +2103,7 @@ dependencies = [
|
|
|
2103
2103
|
|
|
2104
2104
|
[[package]]
|
|
2105
2105
|
name = "rusty-haystack-client"
|
|
2106
|
-
version = "0.5.
|
|
2106
|
+
version = "0.5.4"
|
|
2107
2107
|
dependencies = [
|
|
2108
2108
|
"base64",
|
|
2109
2109
|
"dashmap",
|
|
@@ -2125,13 +2125,14 @@ dependencies = [
|
|
|
2125
2125
|
|
|
2126
2126
|
[[package]]
|
|
2127
2127
|
name = "rusty-haystack-core"
|
|
2128
|
-
version = "0.5.
|
|
2128
|
+
version = "0.5.4"
|
|
2129
2129
|
dependencies = [
|
|
2130
2130
|
"base64",
|
|
2131
2131
|
"chrono",
|
|
2132
2132
|
"criterion",
|
|
2133
2133
|
"dashmap",
|
|
2134
2134
|
"hmac",
|
|
2135
|
+
"indexmap",
|
|
2135
2136
|
"parking_lot",
|
|
2136
2137
|
"pbkdf2",
|
|
2137
2138
|
"proptest",
|
|
@@ -2151,7 +2152,7 @@ dependencies = [
|
|
|
2151
2152
|
|
|
2152
2153
|
[[package]]
|
|
2153
2154
|
name = "rusty-haystack-server"
|
|
2154
|
-
version = "0.5.
|
|
2155
|
+
version = "0.5.4"
|
|
2155
2156
|
dependencies = [
|
|
2156
2157
|
"actix-http",
|
|
2157
2158
|
"actix-rt",
|
|
@@ -13,7 +13,7 @@ categories.workspace = true
|
|
|
13
13
|
name = "haystack_client"
|
|
14
14
|
|
|
15
15
|
[dependencies]
|
|
16
|
-
haystack-core = { package = "rusty-haystack-core", version = "0.5.
|
|
16
|
+
haystack-core = { package = "rusty-haystack-core", version = "0.5.4", path = "../haystack-core" }
|
|
17
17
|
reqwest = { version = "0.13", features = ["rustls-no-provider"], default-features = false }
|
|
18
18
|
rustls = { version = "0.23", features = ["ring", "tls12", "std"], default-features = false }
|
|
19
19
|
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
|
|
@@ -44,6 +44,6 @@ pub use error::ClientError;
|
|
|
44
44
|
///
|
|
45
45
|
/// Called automatically by client constructors. Safe to call multiple times;
|
|
46
46
|
/// only the first call has effect.
|
|
47
|
-
fn ensure_crypto_provider() {
|
|
47
|
+
pub fn ensure_crypto_provider() {
|
|
48
48
|
let _ = rustls::crypto::ring::default_provider().install_default();
|
|
49
49
|
}
|
|
@@ -124,6 +124,8 @@ pub fn encode_meta(d: &HDict) -> Result<String, CodecError> {
|
|
|
124
124
|
|
|
125
125
|
/// Encode an HGrid to the Zinc wire format.
|
|
126
126
|
pub fn encode_grid(grid: &HGrid) -> Result<String, CodecError> {
|
|
127
|
+
use std::fmt::Write;
|
|
128
|
+
|
|
127
129
|
let mut buf = String::new();
|
|
128
130
|
|
|
129
131
|
// Line 1: version + grid meta
|
|
@@ -134,37 +136,34 @@ pub fn encode_grid(grid: &HGrid) -> Result<String, CodecError> {
|
|
|
134
136
|
}
|
|
135
137
|
buf.push('\n');
|
|
136
138
|
|
|
137
|
-
// Line 2: columns
|
|
139
|
+
// Line 2: columns — write directly, comma-delimited.
|
|
138
140
|
if grid.cols.is_empty() {
|
|
139
141
|
buf.push_str("empty\n");
|
|
140
142
|
} else {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
})
|
|
152
|
-
.collect();
|
|
153
|
-
buf.push_str(&col_parts?.join(","));
|
|
143
|
+
for (i, col) in grid.cols.iter().enumerate() {
|
|
144
|
+
if i > 0 {
|
|
145
|
+
buf.push(',');
|
|
146
|
+
}
|
|
147
|
+
buf.push_str(&col.name);
|
|
148
|
+
if !col.meta.is_empty() {
|
|
149
|
+
buf.push(' ');
|
|
150
|
+
buf.push_str(&encode_meta(&col.meta)?);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
154
153
|
buf.push('\n');
|
|
155
154
|
}
|
|
156
155
|
|
|
157
|
-
// Rows
|
|
156
|
+
// Rows — write cells directly, comma-delimited.
|
|
158
157
|
for row in &grid.rows {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
158
|
+
for (i, col) in grid.cols.iter().enumerate() {
|
|
159
|
+
if i > 0 {
|
|
160
|
+
buf.push(',');
|
|
161
|
+
}
|
|
162
|
+
match row.get(&col.name) {
|
|
163
|
+
Some(val) => write!(buf, "{}", encode_scalar(val)?).unwrap(),
|
|
164
|
+
None => buf.push('N'),
|
|
165
|
+
}
|
|
166
|
+
}
|
|
168
167
|
buf.push('\n');
|
|
169
168
|
}
|
|
170
169
|
|
|
@@ -96,6 +96,21 @@ impl RefAdjacency {
|
|
|
96
96
|
pub fn reverse_raw(&self) -> &HashMap<String, SmallVec<[(String, usize); 4]>> {
|
|
97
97
|
&self.reverse
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
/// Get entity IDs that reference `target_ref_val` via `ref_tag`.
|
|
101
|
+
///
|
|
102
|
+
/// Used by the query planner to produce bitmap candidates for ref equality
|
|
103
|
+
/// filters (e.g. `siteRef == @site-0`) without a full entity scan.
|
|
104
|
+
pub fn sources_for(&self, ref_tag: &str, target_ref_val: &str) -> Vec<usize> {
|
|
105
|
+
match self.reverse.get(target_ref_val) {
|
|
106
|
+
Some(edges) => edges
|
|
107
|
+
.iter()
|
|
108
|
+
.filter(|(rt, _)| rt == ref_tag)
|
|
109
|
+
.map(|(_, eid)| *eid)
|
|
110
|
+
.collect(),
|
|
111
|
+
None => Vec::new(),
|
|
112
|
+
}
|
|
113
|
+
}
|
|
99
114
|
}
|
|
100
115
|
|
|
101
116
|
#[cfg(test)]
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
use std::collections::HashMap;
|
|
4
4
|
|
|
5
|
+
use indexmap::IndexMap;
|
|
5
6
|
use parking_lot::Mutex;
|
|
6
7
|
use rayon::prelude::*;
|
|
7
8
|
|
|
8
9
|
use crate::data::{HCol, HDict, HGrid};
|
|
9
|
-
use crate::filter::{matches_with_ns, parse_filter};
|
|
10
|
+
use crate::filter::{FilterNode, matches_with_ns, parse_filter};
|
|
10
11
|
use crate::kinds::{HRef, Kind};
|
|
11
12
|
use crate::ontology::{DefNamespace, ValidationIssue};
|
|
12
13
|
|
|
@@ -56,6 +57,8 @@ pub struct EntityGraph {
|
|
|
56
57
|
/// LRU query cache: (filter, version) → matching ref_vals.
|
|
57
58
|
/// Uses Mutex for interior mutability since read_all takes &self.
|
|
58
59
|
query_cache: Mutex<QueryCache>,
|
|
60
|
+
/// Parsed filter AST cache: filter_string → AST (version-independent).
|
|
61
|
+
ast_cache: Mutex<HashMap<String, FilterNode>>,
|
|
59
62
|
/// Optional B-Tree value indexes for comparison-based filter acceleration.
|
|
60
63
|
value_index: ValueIndex,
|
|
61
64
|
/// CSR snapshot of adjacency for cache-friendly traversal.
|
|
@@ -67,61 +70,53 @@ pub struct EntityGraph {
|
|
|
67
70
|
columnar: ColumnarStore,
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
///
|
|
73
|
+
/// Fixed-capacity LRU cache for filter query results using IndexMap for O(1) ops.
|
|
71
74
|
struct QueryCache {
|
|
72
|
-
|
|
75
|
+
/// (filter, version) → matching ref_vals. Most-recently-used at the back.
|
|
76
|
+
entries: IndexMap<(String, u64), Vec<String>>,
|
|
73
77
|
capacity: usize,
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
struct QueryCacheEntry {
|
|
77
|
-
filter: String,
|
|
78
|
-
version: u64,
|
|
79
|
-
ref_vals: Vec<String>,
|
|
80
|
-
}
|
|
81
|
-
|
|
82
80
|
impl QueryCache {
|
|
83
81
|
fn new(capacity: usize) -> Self {
|
|
84
82
|
Self {
|
|
85
|
-
entries:
|
|
83
|
+
entries: IndexMap::with_capacity(capacity),
|
|
86
84
|
capacity,
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
fn get(&mut self, filter: &str, version: u64) -> Option<&[String]> {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if pos > 0 {
|
|
97
|
-
let entry = self.entries.remove(pos);
|
|
98
|
-
self.entries.insert(0, entry);
|
|
99
|
-
}
|
|
100
|
-
Some(&self.entries[0].ref_vals)
|
|
89
|
+
// Move to back (most recently used) on access.
|
|
90
|
+
let key = (filter.to_string(), version);
|
|
91
|
+
let idx = self.entries.get_index_of(&key)?;
|
|
92
|
+
self.entries.move_index(idx, self.entries.len() - 1);
|
|
93
|
+
self.entries.get(&key).map(|v| v.as_slice())
|
|
101
94
|
}
|
|
102
95
|
|
|
103
96
|
fn insert(&mut self, filter: String, version: u64, ref_vals: Vec<String>) {
|
|
104
|
-
// Evict oldest if at capacity
|
|
105
97
|
if self.entries.len() >= self.capacity {
|
|
106
|
-
|
|
98
|
+
// Evict least recently used (front).
|
|
99
|
+
self.entries.shift_remove_index(0);
|
|
107
100
|
}
|
|
108
|
-
self.entries.insert(
|
|
109
|
-
0,
|
|
110
|
-
QueryCacheEntry {
|
|
111
|
-
filter,
|
|
112
|
-
version,
|
|
113
|
-
ref_vals,
|
|
114
|
-
},
|
|
115
|
-
);
|
|
101
|
+
self.entries.insert((filter, version), ref_vals);
|
|
116
102
|
}
|
|
117
103
|
}
|
|
118
104
|
|
|
119
105
|
const MAX_CHANGELOG: usize = 10_000;
|
|
120
106
|
const QUERY_CACHE_CAPACITY: usize = 256;
|
|
121
107
|
|
|
108
|
+
/// Common Haystack fields to auto-index for O(log N) value lookups.
|
|
109
|
+
const AUTO_INDEX_FIELDS: &[&str] = &[
|
|
110
|
+
"siteRef", "equipRef", "dis", "curVal", "area", "geoCity", "kind", "unit",
|
|
111
|
+
];
|
|
112
|
+
|
|
122
113
|
impl EntityGraph {
|
|
123
|
-
/// Create an empty entity graph.
|
|
114
|
+
/// Create an empty entity graph with standard Haystack fields auto-indexed.
|
|
124
115
|
pub fn new() -> Self {
|
|
116
|
+
let mut value_index = ValueIndex::new();
|
|
117
|
+
for field in AUTO_INDEX_FIELDS {
|
|
118
|
+
value_index.index_field(field);
|
|
119
|
+
}
|
|
125
120
|
Self {
|
|
126
121
|
entities: HashMap::new(),
|
|
127
122
|
id_map: HashMap::new(),
|
|
@@ -133,7 +128,8 @@ impl EntityGraph {
|
|
|
133
128
|
version: 0,
|
|
134
129
|
changelog: std::collections::VecDeque::new(),
|
|
135
130
|
query_cache: Mutex::new(QueryCache::new(QUERY_CACHE_CAPACITY)),
|
|
136
|
-
|
|
131
|
+
ast_cache: Mutex::new(HashMap::new()),
|
|
132
|
+
value_index,
|
|
137
133
|
csr: None,
|
|
138
134
|
csr_version: 0,
|
|
139
135
|
columnar: ColumnarStore::new(),
|
|
@@ -371,14 +367,26 @@ impl EntityGraph {
|
|
|
371
367
|
}
|
|
372
368
|
}
|
|
373
369
|
|
|
374
|
-
|
|
370
|
+
// Use cached AST or parse and cache it (ASTs are version-independent).
|
|
371
|
+
let ast = {
|
|
372
|
+
let mut ast_cache = self.ast_cache.lock();
|
|
373
|
+
if let Some(cached) = ast_cache.get(filter_expr) {
|
|
374
|
+
cached.clone()
|
|
375
|
+
} else {
|
|
376
|
+
let parsed =
|
|
377
|
+
parse_filter(filter_expr).map_err(|e| GraphError::Filter(e.to_string()))?;
|
|
378
|
+
ast_cache.insert(filter_expr.to_string(), parsed.clone());
|
|
379
|
+
parsed
|
|
380
|
+
}
|
|
381
|
+
};
|
|
375
382
|
|
|
376
|
-
// Phase 1: bitmap acceleration (with value index
|
|
383
|
+
// Phase 1: bitmap acceleration (with value index + adjacency).
|
|
377
384
|
let max_id = self.next_id;
|
|
378
385
|
let candidates = query_planner::bitmap_candidates_with_values(
|
|
379
386
|
&ast,
|
|
380
387
|
&self.tag_index,
|
|
381
388
|
&self.value_index,
|
|
389
|
+
&self.adjacency,
|
|
382
390
|
max_id,
|
|
383
391
|
);
|
|
384
392
|
|
|
@@ -386,16 +394,17 @@ impl EntityGraph {
|
|
|
386
394
|
let resolver = |r: &HRef| -> Option<&HDict> { self.entities.get(&r.val) };
|
|
387
395
|
let ns = self.namespace.as_ref();
|
|
388
396
|
|
|
389
|
-
|
|
397
|
+
// Use parallel evaluation only for large unlimited queries where rayon
|
|
398
|
+
// overhead is worthwhile. Bounded queries always use sequential + early exit.
|
|
390
399
|
const PARALLEL_THRESHOLD: usize = 500;
|
|
400
|
+
let use_parallel = effective_limit == usize::MAX;
|
|
391
401
|
|
|
392
402
|
let mut results: Vec<&HDict>;
|
|
393
403
|
|
|
394
404
|
if let Some(ref bitmap) = candidates {
|
|
395
405
|
let candidate_ids: Vec<usize> = TagBitmapIndex::iter_set_bits(bitmap).collect();
|
|
396
406
|
|
|
397
|
-
if candidate_ids.len() >= PARALLEL_THRESHOLD &&
|
|
398
|
-
// Parallel path for large, unlimited queries.
|
|
407
|
+
if candidate_ids.len() >= PARALLEL_THRESHOLD && use_parallel {
|
|
399
408
|
results = candidate_ids
|
|
400
409
|
.par_iter()
|
|
401
410
|
.filter_map(|&eid| {
|
|
@@ -409,7 +418,6 @@ impl EntityGraph {
|
|
|
409
418
|
})
|
|
410
419
|
.collect();
|
|
411
420
|
} else {
|
|
412
|
-
// Sequential path for small sets or limited queries.
|
|
413
421
|
results = Vec::new();
|
|
414
422
|
for eid in TagBitmapIndex::iter_set_bits(bitmap) {
|
|
415
423
|
if results.len() >= effective_limit {
|
|
@@ -426,8 +434,7 @@ impl EntityGraph {
|
|
|
426
434
|
} else {
|
|
427
435
|
let entity_count = self.entities.len();
|
|
428
436
|
|
|
429
|
-
if entity_count >= PARALLEL_THRESHOLD &&
|
|
430
|
-
// Parallel full scan for large, unlimited queries.
|
|
437
|
+
if entity_count >= PARALLEL_THRESHOLD && use_parallel {
|
|
431
438
|
results = self
|
|
432
439
|
.entities
|
|
433
440
|
.par_iter()
|
|
@@ -440,7 +447,6 @@ impl EntityGraph {
|
|
|
440
447
|
})
|
|
441
448
|
.collect();
|
|
442
449
|
} else {
|
|
443
|
-
// Sequential full scan.
|
|
444
450
|
results = Vec::new();
|
|
445
451
|
for entity in self.entities.values() {
|
|
446
452
|
if results.len() >= effective_limit {
|
|
@@ -453,7 +459,6 @@ impl EntityGraph {
|
|
|
453
459
|
}
|
|
454
460
|
}
|
|
455
461
|
|
|
456
|
-
// Apply limit to parallel results.
|
|
457
462
|
if results.len() > effective_limit {
|
|
458
463
|
results.truncate(effective_limit);
|
|
459
464
|
}
|
|
@@ -552,43 +557,53 @@ impl EntityGraph {
|
|
|
552
557
|
) -> (Vec<&HDict>, Vec<(String, String, String)>) {
|
|
553
558
|
use std::collections::{HashSet, VecDeque};
|
|
554
559
|
|
|
555
|
-
let
|
|
556
|
-
|
|
560
|
+
let start_eid = match self.id_map.get(ref_val) {
|
|
561
|
+
Some(&eid) => eid,
|
|
562
|
+
None => return (Vec::new(), Vec::new()),
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
let mut visited: HashSet<usize> = HashSet::new();
|
|
566
|
+
let mut queue: VecDeque<(usize, usize)> = VecDeque::new();
|
|
557
567
|
let mut result_entities: Vec<&HDict> = Vec::new();
|
|
558
568
|
let mut result_edges: Vec<(String, String, String)> = Vec::new();
|
|
559
569
|
|
|
560
|
-
visited.insert(
|
|
561
|
-
queue.push_back((
|
|
570
|
+
visited.insert(start_eid);
|
|
571
|
+
queue.push_back((start_eid, 0));
|
|
562
572
|
|
|
563
573
|
if let Some(entity) = self.entities.get(ref_val) {
|
|
564
574
|
result_entities.push(entity);
|
|
565
575
|
}
|
|
566
576
|
|
|
567
|
-
while let Some((
|
|
577
|
+
while let Some((current_eid, depth)) = queue.pop_front() {
|
|
568
578
|
if depth >= hops {
|
|
569
579
|
continue;
|
|
570
580
|
}
|
|
581
|
+
let current_ref = match self.reverse_id.get(¤t_eid) {
|
|
582
|
+
Some(s) => s.as_str(),
|
|
583
|
+
None => continue,
|
|
584
|
+
};
|
|
585
|
+
|
|
571
586
|
// Traverse forward edges
|
|
572
|
-
if let Some(
|
|
573
|
-
&& let Some(fwd) = self.adjacency.forward_raw().get(&eid)
|
|
574
|
-
{
|
|
587
|
+
if let Some(fwd) = self.adjacency.forward_raw().get(¤t_eid) {
|
|
575
588
|
for (ref_tag, target) in fwd {
|
|
576
589
|
if let Some(types) = ref_types
|
|
577
590
|
&& !types.iter().any(|t| t == ref_tag)
|
|
578
591
|
{
|
|
579
592
|
continue;
|
|
580
593
|
}
|
|
581
|
-
result_edges.push((
|
|
582
|
-
if
|
|
594
|
+
result_edges.push((current_ref.to_string(), ref_tag.clone(), target.clone()));
|
|
595
|
+
if let Some(&target_eid) = self.id_map.get(target.as_str())
|
|
596
|
+
&& visited.insert(target_eid)
|
|
597
|
+
{
|
|
583
598
|
if let Some(entity) = self.entities.get(target.as_str()) {
|
|
584
599
|
result_entities.push(entity);
|
|
585
600
|
}
|
|
586
|
-
queue.push_back((
|
|
601
|
+
queue.push_back((target_eid, depth + 1));
|
|
587
602
|
}
|
|
588
603
|
}
|
|
589
604
|
}
|
|
590
605
|
// Traverse reverse edges
|
|
591
|
-
if let Some(rev) = self.adjacency.reverse_raw().get(
|
|
606
|
+
if let Some(rev) = self.adjacency.reverse_raw().get(current_ref) {
|
|
592
607
|
for (ref_tag, source_eid) in rev {
|
|
593
608
|
if let Some(types) = ref_types
|
|
594
609
|
&& !types.iter().any(|t| t == ref_tag)
|
|
@@ -596,12 +611,16 @@ impl EntityGraph {
|
|
|
596
611
|
continue;
|
|
597
612
|
}
|
|
598
613
|
if let Some(source_ref) = self.reverse_id.get(source_eid) {
|
|
599
|
-
result_edges.push((
|
|
600
|
-
|
|
614
|
+
result_edges.push((
|
|
615
|
+
source_ref.clone(),
|
|
616
|
+
ref_tag.clone(),
|
|
617
|
+
current_ref.to_string(),
|
|
618
|
+
));
|
|
619
|
+
if visited.insert(*source_eid) {
|
|
601
620
|
if let Some(entity) = self.entities.get(source_ref.as_str()) {
|
|
602
621
|
result_entities.push(entity);
|
|
603
622
|
}
|
|
604
|
-
queue.push_back((
|
|
623
|
+
queue.push_back((*source_eid, depth + 1));
|
|
605
624
|
}
|
|
606
625
|
}
|
|
607
626
|
}
|
|
@@ -628,41 +647,59 @@ impl EntityGraph {
|
|
|
628
647
|
if from == to {
|
|
629
648
|
return vec![from.to_string()];
|
|
630
649
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
650
|
+
let from_eid = match self.id_map.get(from) {
|
|
651
|
+
Some(&eid) => eid,
|
|
652
|
+
None => return Vec::new(),
|
|
653
|
+
};
|
|
654
|
+
let to_eid = match self.id_map.get(to) {
|
|
655
|
+
Some(&eid) => eid,
|
|
656
|
+
None => return Vec::new(),
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
// parent map: child_eid -> parent_eid (usize::MAX = root sentinel)
|
|
660
|
+
let mut parents: StdHashMap<usize, usize> = StdHashMap::new();
|
|
661
|
+
let mut queue: VecDeque<usize> = VecDeque::new();
|
|
662
|
+
parents.insert(from_eid, usize::MAX);
|
|
663
|
+
queue.push_back(from_eid);
|
|
634
664
|
|
|
635
|
-
let
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
665
|
+
while let Some(current_eid) = queue.pop_front() {
|
|
666
|
+
let current_ref = match self.reverse_id.get(¤t_eid) {
|
|
667
|
+
Some(s) => s.as_str(),
|
|
668
|
+
None => continue,
|
|
669
|
+
};
|
|
639
670
|
|
|
640
|
-
while let Some(current) = queue.pop_front() {
|
|
641
671
|
// Forward edges
|
|
642
|
-
if let Some(
|
|
643
|
-
&& let Some(fwd) = self.adjacency.forward_raw().get(&eid)
|
|
644
|
-
{
|
|
672
|
+
if let Some(fwd) = self.adjacency.forward_raw().get(¤t_eid) {
|
|
645
673
|
for (_, target) in fwd {
|
|
646
|
-
if
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
674
|
+
if let Some(&target_eid) = self.id_map.get(target.as_str())
|
|
675
|
+
&& let std::collections::hash_map::Entry::Vacant(e) =
|
|
676
|
+
parents.entry(target_eid)
|
|
677
|
+
{
|
|
678
|
+
e.insert(current_eid);
|
|
679
|
+
if target_eid == to_eid {
|
|
680
|
+
return Self::reconstruct_path_usize(
|
|
681
|
+
&parents,
|
|
682
|
+
to_eid,
|
|
683
|
+
&self.reverse_id,
|
|
684
|
+
);
|
|
650
685
|
}
|
|
651
|
-
queue.push_back(
|
|
686
|
+
queue.push_back(target_eid);
|
|
652
687
|
}
|
|
653
688
|
}
|
|
654
689
|
}
|
|
655
690
|
// Reverse edges
|
|
656
|
-
if let Some(rev) = self.adjacency.reverse_raw().get(
|
|
691
|
+
if let Some(rev) = self.adjacency.reverse_raw().get(current_ref) {
|
|
657
692
|
for (_, source_eid) in rev {
|
|
658
|
-
if
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
693
|
+
if !parents.contains_key(source_eid) {
|
|
694
|
+
parents.insert(*source_eid, current_eid);
|
|
695
|
+
if *source_eid == to_eid {
|
|
696
|
+
return Self::reconstruct_path_usize(
|
|
697
|
+
&parents,
|
|
698
|
+
to_eid,
|
|
699
|
+
&self.reverse_id,
|
|
700
|
+
);
|
|
664
701
|
}
|
|
665
|
-
queue.push_back(
|
|
702
|
+
queue.push_back(*source_eid);
|
|
666
703
|
}
|
|
667
704
|
}
|
|
668
705
|
}
|
|
@@ -671,22 +708,26 @@ impl EntityGraph {
|
|
|
671
708
|
Vec::new() // No path found
|
|
672
709
|
}
|
|
673
710
|
|
|
674
|
-
/// Reconstruct path from BFS parent map.
|
|
675
|
-
fn
|
|
676
|
-
parents: &std::collections::HashMap<
|
|
677
|
-
|
|
711
|
+
/// Reconstruct path from usize-based BFS parent map.
|
|
712
|
+
fn reconstruct_path_usize(
|
|
713
|
+
parents: &std::collections::HashMap<usize, usize>,
|
|
714
|
+
to_eid: usize,
|
|
715
|
+
reverse_id: &HashMap<usize, String>,
|
|
678
716
|
) -> Vec<String> {
|
|
679
|
-
let mut
|
|
680
|
-
let mut current =
|
|
681
|
-
while let Some(parent) = parents.get(¤t) {
|
|
682
|
-
if parent
|
|
717
|
+
let mut path_eids = vec![to_eid];
|
|
718
|
+
let mut current = to_eid;
|
|
719
|
+
while let Some(&parent) = parents.get(¤t) {
|
|
720
|
+
if parent == usize::MAX {
|
|
683
721
|
break;
|
|
684
722
|
}
|
|
685
|
-
|
|
686
|
-
current = parent
|
|
723
|
+
path_eids.push(parent);
|
|
724
|
+
current = parent;
|
|
687
725
|
}
|
|
688
|
-
|
|
689
|
-
|
|
726
|
+
path_eids.reverse();
|
|
727
|
+
path_eids
|
|
728
|
+
.iter()
|
|
729
|
+
.filter_map(|eid| reverse_id.get(eid).cloned())
|
|
730
|
+
.collect()
|
|
690
731
|
}
|
|
691
732
|
|
|
692
733
|
/// Return the subtree rooted at `root` up to `max_depth` levels.
|