stale_since

Generic Description

Is a live Cypher function in Nexyron. It is documented separately because time construction, sequence ordering, window parameters, and as-of behavior materially change analytical meaning.

Simple example:

RETURN stale_since(date('2026-03-01'))

Consumer-Level Explanation

Use it when the function semantics match the query intent exactly. Prefer this function when the temporal assumption should be visible to the planner, especially for event streams, freshness checks, and sequence features.

More Detailed Explanation

stale_since should be understood by the value shape it expects and the row shape it returns. It composes with MATCH, WHERE, WITH, RETURN, and procedure output, so planner-facing documentation should describe both the immediate value transformation and why it belongs in the database query.

Advanced Example

This example names the event stream and operational context before applying stale_since, which helps planner tooling preserve the intended sequence semantics.

MATCH (device:Device)-[r:REPORTED]->(m:Metric)
WITH device,
     m,
     stale_since(r.ts) AS staleness_ms,
     properties(m.payload) AS metric_payload
RETURN device.device_id,
       staleness_ms,
       size(keys(metric_payload)) AS payload_fields
ORDER BY staleness_ms DESC
LIMIT 25

Real Use Cases

Real Limitations And Tradeoffs