|
smollerGraph 0.20.2
A small graph database, from scratch
|
#include "smollergraph/api.h"#include <chrono>#include <cmath>#include <cstdint>#include <optional>#include <string>#include <unordered_set>#include <variant>#include <vector>#include "absl/status/status.h"#include "absl/status/statusor.h"#include "absl/strings/numbers.h"#include "absl/strings/str_cat.h"#include "smollergraph/embed.h"#include "smollergraph/parser.h"#include "smollergraph/plan.h"#include "smollergraph/record_file.h"Go to the source code of this file.
Namespaces | |
| namespace | smollergraph |
Functions | |
| std::string | smollergraph::JsonString (std::string_view text) |
| What sg serve answers with, as JSON. | |
| std::string | smollergraph::PropertiesJson (const std::vector< Property > &properties) |
| Returns properties as a JSON object, with a field for each key. | |
| std::string | smollergraph::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. | |
| std::string | smollergraph::ErrorJson (std::string_view message) |
| Returns an error's message as JSON, for the UI to show. | |
| absl::StatusOr< std::string > | smollergraph::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 > | smollergraph::QueryJson (const Graph &graph, std::string_view text) |
| absl::StatusOr< std::string > | smollergraph::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. | |