|
| class | BufferPool |
| | Keeps some of a file's pages in memory, in frames, so reading or changing a page there needs no system call. More...
|
| |
| struct | Cell |
| | A value a query returns, and the node it's a property of. More...
|
| |
| struct | Column |
| | A column of what a plan returns: its heading, such as b.name, p or length(p), and the property of the node in a slot that it returns, or with no slot, the row's path, or a function of it, its length or its cost. More...
|
| |
| struct | Comparison |
| | A comparison in WHERE, such as b.weight_g < 1000: a property, an operator, which is one of = <> < <= > >=, and a value. More...
|
| |
| class | Graph |
| | 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...
|
| |
| struct | Hop |
| | A step from a node along one of its relationships: the relationship, and the node at its other end. More...
|
| |
| class | NameIndex |
| | An index from names to ids, kept in a file of pages as a B+ tree: leaves of names in order, each with its id, and pages above them that say which page holds which names. More...
|
| |
| struct | NodePattern |
| | A node in a pattern, such as (a:Animal {name: 'Red fox'}). More...
|
| |
| struct | NodeRecord |
| | A node on disk: its name, its label's token, which says what kind of node it is, the first of the relationships that start at it, the first of those that end at it, and the first of its properties. More...
|
| |
| class | PageHandle |
| | A page pinned in a buffer pool. More...
|
| |
| class | Pager |
| | A file of pages, each read and written whole, by its number. More...
|
| |
| struct | Path |
| | A path through the graph: its nodes, from its start to its end, and the relationships between them, one fewer. More...
|
| |
| struct | PathSearch |
| | What a search for a path found: the path, if there is one, and how many nodes the search reached, which is most of what it cost. More...
|
| |
| struct | Plan |
| | How to answer a query: where to start, and where to go from there. More...
|
| |
| struct | Property |
| |
| struct | PropertyLookup |
| | A variable's property, such as a.name or b.weight_g. More...
|
| |
| struct | PropertyRecord |
| | A property on disk: its key, its value, and the next property of the node or relationship it belongs to, so their properties form a chain too. More...
|
| |
| struct | Query |
| | A query in our subset of Cypher, such as MATCH (a {name: 'Red fox'})-[:EATS]->(b) WHERE b.weight_g < 1000 RETURN DISTINCT b.name with EXPLAIN in front of it to ask for its plan. More...
|
| |
| class | RecordFile |
| | A file of fixed-size records, packed into pages after a header page, which holds how many records there are. More...
|
| |
| struct | RelationshipPattern |
| | A relationship from a node in a pattern to the next one, such as -[:EATS]->, or -[:EATS*2]->, which is two of them in a row. More...
|
| |
| struct | RelationshipRecord |
| | A relationship on disk: its type's token, the nodes it joins, the next relationship that starts at from and the next that ends at to, so it's in a chain of each of its nodes, then the first of its properties. More...
|
| |
| struct | Result |
| | What a query returns: a row for each match of its pattern, with a cell for each column. More...
|
| |
| struct | ReturnItem |
| | What a query returns in a column: a variable's property, such as b.name, or with no key, a path's variable, such as p, which returns the path, or a function of the path: length(p), how many relationships it has, or cost(p), what its weights add up to. More...
|
| |
| struct | Step |
| | One step of a plan. More...
|
| |
| struct | Token |
| |
| struct | TokenRecord |
| | A token's name on disk. Its id in the file is the token. More...
|
| |
| class | TokenStore |
| | Names and the tokens that stand for them, kept in a file of records, and in memory both ways, as there are only a few of them. More...
|
| |
|
| std::string | JsonString (std::string_view text) |
| | What sg serve answers with, as JSON.
|
| |
| std::string | PropertiesJson (const std::vector< Property > &properties) |
| | Returns properties as a JSON object, with a field for each key.
|
| |
| std::string | ErrorJson (std::string_view message) |
| | Returns an error's message as JSON, for the UI to show.
|
| |
| std::string | NamesJson (const Graph &graph, std::string_view prefix) |
| | Returns a few of the graph's names that start with prefix, in order, for the UI to suggest.
|
| |
| absl::StatusOr< std::string > | NodeJson (const Graph &graph, std::string_view id) |
| | Returns node id's record as it's kept on disk: its label, its page, its offset in the page and its bytes, then its chains of relationships out and in, newest first, each with its properties, the node at its other end and where it's kept, and its chain of properties, newest first, each with where it's kept.
|
| |
| absl::StatusOr< std::string > | QueryJson (const Graph &graph, std::string_view text) |
| |
| absl::StatusOr< std::string > | SimilarJson (const Graph &graph, std::string_view id) |
| | Returns the kSimilar nodes whose embeddings are most like node id's, the most alike first, each with its name, its label and its cosine.
|
| |
| std::vector< Embedding > | FastRP (const Graph &graph, std::string_view type, uint32_t seed) |
| | Returns an embedding for each node, in the order of their ids, computed with FastRP, as Neo4j's Graph Data Science library does: a sparse random vector for each node, then five rounds, in each of which a node's vector is the sum of its neighbours' vectors from the round before, along relationships of type followed both ways, scaled to a length of one.
|
| |
| float | Cosine (const Embedding &a, const Embedding &b) |
| | How alike two embeddings are: the cosine of the angle between them, 1 when they point the same way, 0 at right angles, and -1 when they're opposite.
|
| |
| std::vector< std::pair< NodeId, float > > | MostSimilar (const std::vector< Embedding > &embeddings, NodeId node, size_t k) |
| | Returns the k nodes whose embeddings are most like node's, with their cosines, the most alike first.
|
| |
| absl::Status | Export (const Graph &graph, const std::string &path) |
| | Writes the graph into the folder at path, for programs outside the database to read, such as a script that trains a model: nodes.jsonl, a line of JSON for each node, with its id, name, label and properties, and relationships.csv, a line for each relationship, with the ids of the nodes it joins and its type.
|
| |
| 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), or a node on its own, such as (Rabbit).
|
| |
| Direction | Reversed (Direction direction) |
| | The direction to follow a relationship in from its other end: out becomes in, in becomes out, and both stays both.
|
| |
| Value | ValueOf (const PropertyRecord &record) |
| | Reads the value a property's record holds.
|
| |
| absl::StatusOr< std::vector< Token > > | Lex (std::string_view query) |
| | Splits a query into tokens, ending with a kEnd token.
|
| |
| 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'}, with a string or a whole number for each key.
|
| |
| absl::StatusOr< Plan > | PlanQuery (const Query &query) |
| | Plans a query, starting from the node of its pattern that's cheapest to find, or for a shortest path, finding both its nodes, and then the path.
|
| |
| std::string | Explain (const Plan &plan) |
| | The plan's steps, a line each, in the order they run, as EXPLAIN shows them.
|
| |
| std::string | ValueText (const Value &value) |
| | A value as sg query prints it: a number in digits, and a string as it is.
|
| |
| Result | Run (const Plan &plan, const Graph &graph) |
| | Runs a plan on a graph, a step at a time, each on all of the rows at once.
|
| |
| absl::StatusOr< Result > | Execute (const Graph &graph, std::string_view text) |
| | Parses, plans and runs a query in our subset of Cypher on a graph, in one call, as Kùzu's connection does with execute.
|
| |
| std::vector< NodeId > | Walk (const Graph &graph, NodeId start, std::string_view type, int hops) |
| | Returns the nodes exactly hops relationships of type away from start, each once, in the order a breadth-first walk reaches them.
|
| |
| std::vector< std::vector< NodeId > > | WalkHops (const Graph &graph, NodeId start, std::string_view type, int hops) |
| | Returns the nodes each hop of that walk reaches: the start on its own, then the nodes one hop away, and so on, so the last of them is what Walk returns.
|
| |
| PathSearch | ShortestPath (const Graph &graph, NodeId from, NodeId to, const std::vector< std::string > &types, Direction direction) |
| | Returns a shortest path from from to to, along relationships of any of types followed in direction: one with as few hops as any other.
|
| |
| PathSearch | CheapestPath (const Graph &graph, NodeId from, NodeId to, const std::vector< std::string > &types, Direction direction, std::string_view key) |
| | Returns a cheapest path from from to to, along relationships of any of types followed in direction: one whose relationships' weights, their property key, add up to as little as any other's, found with Dijkstra's algorithm.
|
| |
| std::string | PathText (const Graph &graph, const Path &path) |
| | A path as Cypher writes it, with the nodes' names, and each relationship's arrow pointing the way it goes, with its properties in braces.
|
| |
| absl::Status | Serve (const Graph &graph, const std::string &address, int port) |
| | Answers HTTP requests for the graph on address and port, until the process is stopped.
|
| |