meshdb-executor 0.2.0

Physical operators and query execution for Mesh
Documentation
[package]
name = "meshdb-executor"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "Physical operators and query execution for Mesh"

[dependencies]
meshdb-core = { workspace = true }
meshdb-storage = { workspace = true }
meshdb-cypher = { workspace = true }
meshdb-apoc = { workspace = true, optional = true }
serde = { workspace = true }
# `apoc.load.*` / `apoc.export.*` pull these in via the
# `apoc-load` feature. Kept optional so slim builds (no
# `apoc-load`) don't compile a ~40-crate HTTP/JSON/CSV stack
# they'll never exercise.
serde_json = { workspace = true, optional = true }
reqwest = { version = "0.12", default-features = false, features = ["blocking", "rustls-tls"], optional = true }
csv = { version = "1.3", optional = true }
thiserror.workspace = true
chrono.workspace = true
chrono-tz.workspace = true
regex = "1"
uuid.workspace = true
tracing = { workspace = true, optional = true }

[dev-dependencies]
tempfile = "3"

[features]
# APOC-compatible scalars and procedures ship enabled by
# default — the `apoc` umbrella feature pulls in every shipped
# namespace. Embedded callers wanting a slimmer build use
# `default-features = false` and re-enable specific apoc-*
# sub-features as needed; turning on any one of them activates
# the executor-side adapter via the private `__apoc` marker.
default = ["apoc"]

# Private marker — any `apoc-*` sub-feature depends on it so the
# adapter code in `eval.rs` only compiles when something actually
# needs it. Users don't set this directly.
__apoc = []

# Per-namespace opt-in. Each maps 1:1 to a feature on the
# `meshdb-apoc` crate.
apoc-coll = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/coll"]
apoc-text = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/text"]
apoc-map = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/map"]
apoc-util = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/util"]
apoc-convert = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/convert"]
apoc-date = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/date"]
apoc-number = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/number"]
apoc-create = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/create"]
apoc-meta = ["__apoc", "dep:meshdb-apoc", "meshdb-apoc/meta"]
# `apoc.refactor.*` is procedure-only — there's no scalar slice in
# `meshdb-apoc` to depend on, so this feature gates the executor-
# side procedure registration directly. No `__apoc` either, since
# that flag is the scalar dispatcher's marker.
apoc-refactor = []
# `apoc.path.*` — traversal procedures (expand / expandConfig /
# subgraphAll / subgraphNodes / spanningTree) plus the
# Path-aware scalars (create / slice / combine / elements).
# These scalars live in `eval.rs` directly rather than routing
# through `meshdb-apoc`, because they take / return graph
# element values (Node / Edge / Path) the APOC scalar
# dispatcher can't carry. No `__apoc` marker because the scalar
# wiring is native-executor-side.
apoc-path = []
# `apoc.cypher.*` — run an arbitrary Cypher statement from
# inside another query. Ships `apoc.cypher.run` (read-only) and
# `apoc.cypher.doIt` (write-capable); both recurse into
# `execute_with_reader_and_procs` with the current reader /
# writer / procedure registry so inner writes accumulate in the
# outer buffer for atomic commit, and nested procedure calls
# resolve against the same registry.
apoc-cypher = []
# `apoc.load.*` — read JSON / CSV from a local file or HTTP URL
# and stream the records as Cypher rows. Ships disabled by
# default at runtime via ImportConfig (strict opt-in per
# import-root directory and URL allowlist) — compiling in the
# feature only enables the procedures; they still refuse to run
# until the server config opts in explicitly. Pulls in the
# `serde_json`, `csv`, and `reqwest` (blocking + rustls-tls)
# deps that slim builds don't need.
apoc-load = ["dep:serde_json", "dep:csv", "dep:reqwest"]
# `apoc.export.*` — write the graph (or a query result) to a
# local file as CSV / JSON / re-runnable Cypher. Reuses
# `apoc-load`'s ImportConfig + security gates — the same
# `allow_file` / `file_root` operator settings govern both
# directions. Compiling in the feature does not itself enable
# exports; the runtime ImportConfig still has to opt in.
apoc-export = ["apoc-load"]
# `apoc.trigger.*` — install Cypher snippets that fire after
# a successful commit, with the tx diff exposed as `$createdNodes`
# / `$createdRelationships` / `$deletedNodes` /
# `$deletedRelationships` params. V1 ships only the `after`
# phase, only the install / drop / list procedures, and only
# the local-node store (no cluster replication). Documented
# gaps (before / afterAsync / rollback phases, pause/resume,
# property-change tracking) are tracked in CLAUDE.md. Pulls
# in `serde_json` for trigger spec persistence.
apoc-trigger = ["dep:serde_json", "dep:tracing"]

# Umbrella: every shipped namespace. Add new sub-features here as
# they land so `--features apoc` keeps meaning "everything".
apoc = [
    "apoc-coll",
    "apoc-text",
    "apoc-map",
    "apoc-util",
    "apoc-convert",
    "apoc-date",
    "apoc-number",
    "apoc-create",
    "apoc-meta",
    "apoc-refactor",
    "apoc-path",
    "apoc-cypher",
    "apoc-load",
    "apoc-export",
    "apoc-trigger",
]