smollerGraph 0.20.2
A small graph database, from scratch
Loading...
Searching...
No Matches
smollergraph::Step Struct Reference

One step of a plan. More...

#include <plan.h>

Public Types

enum class  Kind {
  kNodeIndexSeek , kAllNodesScan , kNodeByLabelScan , kExpand ,
  kFilter , kHasLabel , kShortestPath , kCheapestPath
}
 

Public Attributes

Kind kind
 
int from = -1
 
int to = -1
 
std::string text {}
 
std::string op = "="
 A filter's operator, and the value it compares with.
 
Value value {}
 
Direction direction = Direction::kOut
 Which of its node's relationships an expand or a path follows.
 
std::string weight {}
 The property a cheapest path adds up.
 
std::vector< std::string > types {}
 The relationship types an expand or a path follows.
 

Detailed Description

One step of a plan.

A plan works on rows, which have a slot for each node of the pattern, and each step turns the rows it's given into the rows for the next step. The steps take their names from Neo4j's plans.

Definition at line 19 of file plan.h.

Member Enumeration Documentation

◆ Kind

enum class smollergraph::Step::Kind
strong
Enumerator
kNodeIndexSeek 

A row for the node named text, in slot to, found in the index.

kAllNodesScan 

A row for each node in the graph, in slot to.

kNodeByLabelScan 

A row for each node with the label text, in slot to.

With no index on labels, it reads each node's record to find them.

kExpand 

For each row, a row for each node that a relationship of any of the types goes to from the node in slot from, in slot to, or comes from, when its direction is in.

kFilter 

The rows whose node in slot from has a property text that compares with value as op says.

kHasLabel 

The rows whose node in slot from has the label text.

kShortestPath 

For each row, a shortest path from the node in slot from to the node in slot to, along relationships of any of the types, and no row when there's no path.

kCheapestPath 

The same for a cheapest path, whose relationships' weight adds up to the least.

Definition at line 20 of file plan.h.

Member Data Documentation

◆ direction

Direction smollergraph::Step::direction = Direction::kOut

Which of its node's relationships an expand or a path follows.

Definition at line 53 of file plan.h.

◆ from

int smollergraph::Step::from = -1

Definition at line 46 of file plan.h.

◆ kind

Kind smollergraph::Step::kind

Definition at line 45 of file plan.h.

◆ op

std::string smollergraph::Step::op = "="

A filter's operator, and the value it compares with.

Definition at line 50 of file plan.h.

◆ text

std::string smollergraph::Step::text {}

Definition at line 48 of file plan.h.

◆ to

int smollergraph::Step::to = -1

Definition at line 47 of file plan.h.

◆ types

std::vector<std::string> smollergraph::Step::types {}

The relationship types an expand or a path follows.

Definition at line 57 of file plan.h.

◆ value

Value smollergraph::Step::value {}

Definition at line 51 of file plan.h.

◆ weight

std::string smollergraph::Step::weight {}

The property a cheapest path adds up.

Definition at line 55 of file plan.h.


The documentation for this struct was generated from the following file: