Skip to main content

Module extension

Module extension 

Source
Expand description

SQLite extension entry point using sqlite-loadable

This module provides the SQLite loadable extension interface.

Functions§

_sqlite3_sqlite_knowledge_graph_init
Extension entry point
kg_bfs
kg_bfs() - BFS traversal from a starting entity Parameters: start_id (INTEGER), max_depth (INTEGER, default 3) Returns JSON array of {entity_id, depth} objects
kg_connected_components
kg_connected_components() - Find connected components in the graph Returns JSON with component information
kg_louvain
kg_louvain() - Detect communities using Louvain algorithm Returns JSON with community memberships and modularity score
kg_pagerank
kg_pagerank() - Compute PageRank scores for all entities Parameters: damping (REAL, default 0.85), max_iterations (INTEGER, default 100), tolerance (REAL, default 1e-6) Returns JSON with algorithm info
kg_shortest_path
kg_shortest_path() - Find shortest path between two entities Parameters: from_id (INTEGER), to_id (INTEGER), max_depth (INTEGER, default 10) Returns JSON array of entity IDs representing the path
kg_stats
kg_stats() - Returns graph statistics as JSON
kg_version
kg_version() - Returns the extension version
sqlite3_sqlite_knowledge_graph_init
Safety