#![allow(clippy::result_large_err)]
#![allow(clippy::new_without_default)]
#![allow(clippy::len_without_is_empty)]
#![allow(private_interfaces)]
#![allow(hidden_glob_reexports)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::should_implement_trait)]
#![allow(clippy::result_unit_err)]
pub mod code_tree;
pub(crate) mod datasets;
pub mod datatypes;
pub mod error;
pub(crate) mod graph;
pub mod graphgen;
#[cfg(feature = "okf")]
pub mod okf;
pub mod param;
pub mod api {
pub use crate::datatypes::values::{NodeValue, PathValue, RelValue};
pub use crate::datatypes::Value;
pub use crate::error::{KgError, KgErrorCode};
pub use crate::graph::dir_graph::DirGraph;
#[cfg(feature = "fastembed")]
pub use crate::graph::embedder::fastembed::FastEmbedAdapter;
pub use crate::graph::embedder::Embedder;
pub use crate::graph::explore::{explore_markdown, ExploreOptions};
pub use crate::graphgen::{generate_to_dir as graphgen, GraphGenConfig, GraphGenStats};
pub use crate::graph::handle::{
discover_property_keys_from_data, infer_selection_node_type, KnowledgeGraph,
};
pub use crate::graph::schema::{
parse_spatial_column_types_from_pairs, parse_temporal_column_types_from_pairs,
ConnectionSchemaDefinition, NodeData, NodeInfo, NodeSchemaDefinition, SchemaDefinition,
SpatialConfig, TemporalConfig, ValidationError,
};
pub use crate::graph::schema::{
CowSelection, CurrentSelection, PlanStep, SelectionLevel, SelectionOperation,
};
pub use crate::graph::storage::interner::{InternedKey, StringInterner};
pub use crate::graph::storage::GraphRead;
pub use crate::graph::TemporalContext;
pub use crate::graph::handle::make_dir_graph_mut;
pub mod param {
pub use crate::param::{
json_object_to_value_map, json_value_to_kglite_value, kglite_value_to_json,
};
}
pub mod mutation {
pub use crate::graph::introspection::reporting::{
ConnectionOperationReport, NodeOperationReport, OperationReport, OperationReports,
};
pub use crate::graph::mutation::extend::{extend_graph, ExtendReport};
pub use crate::graph::mutation::maintain::{
add_connections, add_edges_from_specs, add_nodes, add_properties, create_connections,
purge_provisional_nodes, replace_connections, update_node_properties, EdgeSpec,
EdgeSpecReport, PropertySpec,
};
pub use crate::graph::mutation::validation::validate_graph;
}
pub mod fluent {
pub use crate::graph::mutation::set_ops::{
difference_selections, intersection_selections, symmetric_difference_selections,
union_selections,
};
pub use crate::graph::mutation::subgraph::{
expand_selection, extract_subgraph, get_subgraph_stats, SubgraphStats,
};
pub use crate::graph::core::filtering::{
filter_by_connection, filter_nodes, filter_nodes_any, filter_nodes_by_label,
filter_orphan_nodes, limit_nodes_per_group, offset_nodes, sort_nodes,
};
pub use crate::graph::core::traversal::{
format_for_dictionary, format_for_storage, get_children_properties,
make_comparison_traversal, make_traversal, MethodConfig, TemporalEdgeFilter,
};
pub use crate::graph::core::calculations::{
count_nodes_by_parent, count_nodes_in_level, process_equation, store_count_results,
EvaluationResult, StatResult,
};
pub use crate::graph::core::data_retrieval::{
format_unique_values_for_storage, get_connections, get_nodes, get_property_values,
get_unique_values, LevelConnections, LevelNodes, LevelValues, UniqueValues,
};
pub use crate::graph::core::statistics::{
calculate_property_stats, collect_selected_nodes, get_parent_child_pairs, PropertyStats,
};
pub use crate::graph::core::pattern_matching::{
parse_pattern, MatchBinding, PatternExecutor, PatternMatch,
};
pub use crate::graph::core::value_operations::format_value_compact;
pub use crate::graph::features::spatial::{
calculate_centroid, contains_point, get_bounds, intersects_geometry, near_point,
near_point_m, within_bounds, wkt_centroid,
};
pub use crate::graph::features::temporal::{
node_is_temporally_valid, node_overlaps_range, node_passes_context,
};
}
pub mod algorithms {
pub use crate::graph::algorithms::graph_algorithms::{
all_paths, are_connected, betweenness_centrality, closeness_centrality,
connected_components, degree_centrality, get_node_info, get_path_connections,
label_propagation, louvain_communities, node_degree, pagerank, shortest_path,
shortest_path_cost, shortest_path_cost_batch, shortest_path_cost_weighted,
shortest_path_weighted, weakly_connected_components, CentralityResult, CommunityResult,
PathNodeInfo, PathResult,
};
pub use crate::graph::algorithms::hnsw::HnswParams;
pub use crate::graph::algorithms::vector::{
vector_search, DistanceMetric, VectorSearchResult,
};
pub use crate::graph::algorithms::Interrupt;
}
pub mod timeseries {
pub use crate::graph::features::timeseries::{
date_from_ymd, expand_end, find_range, parse_date_query, validate_channel_length,
validate_keys_sorted, validate_resolution, DatePrecision, InlineTimeseriesConfig,
NodeTimeseries, TimeSpec, TimeseriesConfig,
};
}
pub mod introspection {
pub use crate::graph::introspection::bug_report::write_bug_report;
pub use crate::graph::introspection::debugging;
pub use crate::graph::introspection::describe::{compute_description, mcp_quickstart};
pub use crate::graph::introspection::schema_overview::{
compute_connection_type_stats, compute_neighbors_schema, compute_property_stats,
compute_schema,
};
pub use crate::graph::introspection::{
compute_type_connectivity, derive_edge_counts_from_triples, schema_overview_to_json,
ConnectionDetail, ConnectionTypeStats, CypherDetail, FluentDetail, SchemaOverview,
};
}
pub mod io {
pub use crate::graph::io::export::{to_csv, to_csv_dir, to_d3_json, to_gexf, to_graphml};
pub use crate::graph::io::file::{
export_embeddings_to_file, import_embeddings_from_file, EmbeddingExportFilter,
ImportStats,
};
pub use crate::graph::io::file::{
load_file, load_kgl_bytes, prepare_save, save_graph, save_graph_with, write_kgl,
write_kgl_to, write_kgl_with,
};
pub use crate::graph::io::ntriples::{
load_ntriples, Cancelled, NTriplesConfig, ProgressEvent, ProgressSink, ProgressValue,
};
#[cfg(feature = "rdf")]
pub use crate::graph::io::rdf::{load_rdf, RdfConfig, RdfStats};
pub use crate::graph::mutation::subgraph_streaming::{
pass_a_scan, pass_a_scan_to_file, save_subset, save_subset_streaming_disk, RankIndex,
SubsetSpec,
};
}
pub mod storage {
pub use crate::graph::schema::EmbeddingStore;
pub use crate::graph::storage::backend::GraphBackend;
pub use crate::graph::storage::disk::graph::DiskGraph;
pub use crate::graph::storage::lookups::TypeLookup;
pub use crate::graph::storage::mode::{new_dir_graph_in_mode, StorageMode};
pub use crate::graph::storage::MappedGraph;
}
pub mod durable {
pub use crate::graph::mutation::wal_replay::apply_frames;
pub use crate::graph::storage::recording::{resolve_ops, RecordingGraph};
pub use crate::graph::wal::{recover, wal_path, Wal, WalFrame};
}
pub mod code_tree {
pub use crate::code_tree::builder::run_with_options as build_code_tree;
pub use crate::code_tree::parsers::language_for_path;
pub use crate::graph::handle::{resolve_code_entity, source_location, CODE_TYPES};
pub use crate::graph::{SourceLocation, SourceLookup};
}
pub mod blueprint {
pub use crate::graph::blueprint::build::{build, BuildReport, FlatSpec};
pub use crate::graph::blueprint::json_records::{from_records, RecordsReport};
pub use crate::graph::blueprint::schema::{
load_blueprint_file, AggregateEdge, Blueprint, CalendarLink, ComputeOp, Connections,
FkEdge, JunctionEdge, NodeSpec, Settings, TimeKey, TimeseriesSpec,
};
}
pub mod cypher {
pub use crate::graph::languages::cypher::ast::{
CypherQuery, Expression, OutputFormat, ReturnItem,
};
pub use crate::graph::languages::cypher::executor::write::execute_mutable;
pub use crate::graph::languages::cypher::executor::CypherExecutor;
pub use crate::graph::languages::cypher::generate_explain_result;
pub use crate::graph::languages::cypher::is_mutation_query;
pub use crate::graph::languages::cypher::parse_with_mutation_check;
pub use crate::graph::languages::cypher::parser::parse_cypher;
pub use crate::graph::languages::cypher::planner;
pub use crate::graph::languages::cypher::planner::mark_lazy_eligibility;
pub use crate::graph::languages::cypher::planner::schema_check::validate_schema;
pub use crate::graph::languages::cypher::planner::simplification::rewrite_text_score;
pub use crate::graph::languages::cypher::result::CypherResult;
pub use crate::graph::languages::cypher::value_codec::{CodecKind, StoredType, ValueCodec};
pub use crate::graph::languages::cypher::executor::helpers::{
resolve_edge_property, resolve_node_property,
};
pub use crate::graph::languages::cypher::optimize;
pub use crate::graph::languages::cypher::planner::schema_check::collect_unknown_pattern_warnings;
pub use crate::graph::languages::cypher::result::{
ClauseStats, EdgeBinding, MutationStats, QueryDiagnostics, ResultRow,
};
}
pub mod session {
pub use crate::graph::session::{
execute_mut, execute_read, resolve_noderefs, CommitOutcome, ExecuteOptions,
ExecuteOutcome, Session, Transaction,
};
}
pub mod datasets {
#[cfg(any(feature = "sec", feature = "sodir", feature = "wikidata"))]
pub use crate::datasets::blocking::run as block_on;
#[cfg(feature = "sec")]
pub mod sec {
pub use crate::datasets::sec::{
pick_storage_mode, predict_graph_size_gb, SecError, SliceSpec, StorageMode,
Workdir, YearRange,
};
pub use crate::datasets::sec::{
fetch_13f_info_table, fetch_company_facts, fetch_company_submission,
fetch_company_tickers, fetch_exhibit21_attachment, fetch_filing_primary_doc,
fetch_form4_filing, fetch_quarterly_master_idx, fetch_submissions_bulk, FetchMode,
SecClient,
};
pub use crate::datasets::sec::{
all_buckets, prepare_dispatch_plan, resolve_fetch_buckets, DispatchScope,
SecFormBucket,
};
pub use crate::datasets::sec::{parse_tickers_json, run_all, ExtractReport};
}
#[cfg(feature = "sodir")]
pub mod sodir {
pub use crate::datasets::sodir::{SodirError, Workdir};
pub use crate::datasets::sodir::{fetch_all, FetchAllReport};
pub use crate::datasets::sodir::{datasets_used_by_blueprint, merge_blueprint_json};
}
#[cfg(feature = "wikidata")]
pub mod wikidata {
pub use crate::datasets::wikidata::{
ensure_dump, remote_last_modified, WikidataError, Workdir,
};
pub use crate::datasets::wikidata::{decide, CacheDecision, FreshnessInputs};
}
}
}