smollerGraph 0.20.2
A small graph database, from scratch
Loading...
Searching...
No Matches
facts.h
Go to the documentation of this file.
1#ifndef SMOLLERGRAPH_FACTS_H_
2#define SMOLLERGRAPH_FACTS_H_
3
4#include <istream>
5#include <string>
6
7#include "absl/status/status.h"
9
10namespace smollergraph {
11
12// Reads facts into `graph`, one a line, written as Cypher patterns such as
13// (Red fox)-[:EATS]->(Rabbit), or a node on its own, such as (Rabbit). A node
14// can have a label after a colon, and nodes and relationships can have
15// properties in braces, as in (Rabbit:Animal {legs: 4}). Blank lines and lines
16// starting with # are skipped. On a
17// line it can't read, it stops, and returns an error with the line as its
18// message.
19absl::Status LoadFacts(std::istream& in, Graph& graph);
20
21} // namespace smollergraph
22
23#endif // SMOLLERGRAPH_FACTS_H_
absl::Status LoadFacts(std::istream &in, Graph &graph)
Reads facts into graph, one a line, written as Cypher patterns such as (Red fox)-[:EATS]->(Rabbit),...
Definition facts.cc:67