1#ifndef SMOLLERGRAPH_PARSER_H_
2#define SMOLLERGRAPH_PARSER_H_
8#include "absl/status/statusor.h"
89absl::StatusOr<Query>
Parse(std::string_view
text);
std::variant< int64_t, std::string > Value
A property's value, as the graph hands it out: a whole number or a string.
absl::StatusOr< Query > Parse(std::string_view text)
Reads a query.
absl::StatusOr< std::vector< Property > > ParseProperties(std::string_view text)
Reads properties as Cypher writes them, in braces, such as {legs: 4, diet: 'omnivore'},...
Direction
A node and a property take 64 bytes, and a relationship 24, so a page holds 170 relationships,...
constexpr int kAnyHops
The hops of a relationship written with a star and no number, such as -[:KNOWS*]-,...
A comparison in WHERE, such as b.weight_g < 1000: a property, an operator, which is one of = <> < <= ...
A node in a pattern, such as (a:Animal {name: 'Red fox'}).
std::vector< Property > properties
A variable's property, such as a.name or b.weight_g.
A query in our subset of Cypher, such as MATCH (a {name: 'Red fox'})-[:EATS]->(b) WHERE b....
std::vector< RelationshipPattern > relationships
std::string path
The path's variable, for a pattern written as p = shortestPath(...), which asks for a shortest path b...
std::vector< Comparison > where
The comparisons in WHERE, joined by AND, so a row has to pass them all.
std::vector< NodePattern > nodes
std::vector< ReturnItem > returns
What it returns, in order.
A relationship from a node in a pattern to the next one, such as -[:EATS]->, or -[:EATS*2]->,...
std::vector< std::string > types
Its types: a relationship of any of them matches.
std::string weight
The property a cheapest path adds up, as in -[:KNOWS* WSHORTEST(weight)]-, which is how Kùzu writes i...
Direction direction
Which way to follow it from the node before it: out, in when it's written with its arrow on the left,...
What a query returns in a column: a variable's property, such as b.name, or with no key,...