Edge

Entry point for constructing edge filter expressions.

The Edge filter provides:

  • endpoint filters via src() and dst(),
  • property and metadata filters,
  • view restrictions (time windows, snapshots, layers),
  • and structural predicates over edge state (active/valid/deleted/self-loop).

Methods

MethodDescription
afterRestricts edge evaluation to times strictly after the given time.
atRestricts edge evaluation to a single point in time.
beforeRestricts edge evaluation to times strictly before the given time.
dstSelects the edge destination endpoint for filtering.
is_activeMatches edges that have at least one event in the current view.
is_deletedMatches edges that have been deleted.
is_self_loopMatches edges that are self-loops (source == destination).
is_validMatches edges that are structurally valid in the current view.
latestEvaluates edge predicates against the latest available edge state.
layerRestricts evaluation to edges belonging to the given layer.
layersRestricts evaluation to edges belonging to any of the given layers.
metadataFilters an edge metadata field by name.
propertyFilters an edge property by name.
snapshot_atEvaluates edge predicates against a snapshot of the graph at a given time.
snapshot_latestEvaluates edge predicates against the most recent snapshot of the graph.
srcSelects the edge source endpoint for filtering.
windowRestricts edge evaluation to the given time window.

Method Details

after

Signature: after(time)

Restricts edge evaluation to times strictly after the given time.

Parameters

NameTypeDefaultDescription
timeint-Lower time bound.

at

Signature: at(time)

Restricts edge evaluation to a single point in time.

Parameters

NameTypeDefaultDescription
timeint-Event time.

before

Signature: before(time)

Restricts edge evaluation to times strictly before the given time.

Parameters

NameTypeDefaultDescription
timeint-Upper time bound.

dst

Selects the edge destination endpoint for filtering.

is_active

Matches edges that have at least one event in the current view.

is_deleted

Matches edges that have been deleted.

is_self_loop

Matches edges that are self-loops (source == destination).

is_valid

Matches edges that are structurally valid in the current view.

latest

Evaluates edge predicates against the latest available edge state.

layer

Signature: layer(layer)

Restricts evaluation to edges belonging to the given layer.

Parameters

NameTypeDefaultDescription
layerstr-Layer name.

layers

Signature: layers(layers)

Restricts evaluation to edges belonging to any of the given layers.

Parameters

NameTypeDefaultDescription
layerslist[str]-Layer names.

metadata

Signature: metadata(name)

Filters an edge metadata field by name.

Metadata is shared across all temporal versions of an edge.

Parameters

NameTypeDefaultDescription
namestr-Metadata key.

property

Signature: property(name)

Filters an edge property by name.

The property may be static or temporal depending on the query context.

Parameters

NameTypeDefaultDescription
namestr-Property key.

snapshot_at

Signature: snapshot_at(time)

Evaluates edge predicates against a snapshot of the graph at a given time.

Parameters

NameTypeDefaultDescription
timeint-Snapshot time.

snapshot_latest

Evaluates edge predicates against the most recent snapshot of the graph.

src

Selects the edge source endpoint for filtering.

window

Signature: window(start, end)

Restricts edge evaluation to the given time window.

The window is inclusive of start and exclusive of end.

Parameters

NameTypeDefaultDescription
startint-Start time.
endint-End time.