A graph kept in three files of records, one for nodes, one for relationships and one for their properties, with an index that finds a node by its name, and a store each for the tokens of labels and types.
More...
|
| | Graph () |
| | A graph in temporary files, which are deleted with it.
|
| |
| absl::Status | Open (const std::string &path) |
| | Opens the graph in the folder at path, creating it when it isn't there.
|
| |
| void | Flush () |
| | Writes the graph's changed pages to its files, which closing it does too.
|
| |
| NodeId | AddNode (std::string_view name) |
| | Returns the node with this name, adding it the first time.
|
| |
| RelationshipId | AddRelationship (NodeId from, std::string_view type, NodeId to) |
| |
| void | SetLabel (NodeId node, std::string_view label) |
| | Gives a node its label, such as Species, in place of the one it had.
|
| |
| void | SetProperty (NodeId node, std::string_view key, const Value &value) |
| | Sets a property of a node or a relationship, replacing the value it had.
|
| |
| void | SetRelationshipProperty (RelationshipId relationship, std::string_view key, const Value &value) |
| |
| void | SetEmbedding (NodeId node, const Embedding &embedding) |
| | Keeps a node's embedding, in place of the one it had.
|
| |
| std::vector< Embedding > | Embeddings () const |
| | Returns the embeddings of all the nodes, in the order of their ids, or none unless each node has one.
|
| |
| std::optional< Value > | FindProperty (NodeId node, std::string_view key) const |
| | Returns a node's property, if it has one. Its name is a property too.
|
| |
| std::optional< Value > | FindRelationshipProperty (RelationshipId relationship, std::string_view key) const |
| | Returns a relationship's property, if it has one, such as its weight.
|
| |
| std::vector< Property > | Properties (NodeId node) const |
| | Returns the properties of a node or a relationship, in the order they were first set.
|
| |
| std::vector< Property > | RelationshipProperties (RelationshipId relationship) const |
| |
| std::optional< NodeId > | Find (std::string_view name) const |
| | Returns the node with this name, if the graph has one.
|
| |
| std::vector< std::string > | NamesStartingWith (std::string_view prefix, size_t limit) const |
| | Returns up to limit names that start with prefix, in order.
|
| |
| std::vector< Hop > | Hops (NodeId node, const std::vector< std::string > &types, Direction direction) const |
| | Returns the hops from node along relationships of any of types: those that start at it, those that end at it with kIn, or with kBoth, the ones out and then the ones in.
|
| |
| std::vector< NodeId > | Neighbours (NodeId node, std::string_view type, Direction direction=Direction::kOut) const |
| | Returns the nodes the hops along relationships of type lead to.
|
| |
| std::string | name (NodeId node) const |
| |
| std::string | label (NodeId node) const |
| |
| std::string | type (RelationshipId relationship) const |
| |
| NodeRecord | node (NodeId id) const |
| |
| RelationshipRecord | relationship (RelationshipId id) const |
| |
| PropertyRecord | property (PropertyId id) const |
| |
| size_t | node_count () const |
| |
| size_t | relationship_count () const |
| |
| uint64_t | page_reads () const |
| | How many pages the graph's files have read and written.
|
| |
| uint64_t | page_writes () const |
| |
A graph kept in three files of records, one for nodes, one for relationships and one for their properties, with an index that finds a node by its name, and a store each for the tokens of labels and types.
Definition at line 113 of file graph.h.