import type { DatabaseHandle } from './db.js'; import type { ParsedEdge } from '../types.js'; /** * Append an edge. Edges are never de-duplicated by (source, target, context); * the graph layer handles any collapsing. `targetSubpath` captures a `#heading` * or `^block` suffix from a wiki-link (without the `#` / `^` itself) — null * for bare references. Naming matches Obsidian's LinkCache.subpath / Dataview * Link.subpath. */ export declare function insertEdge(db: DatabaseHandle, edge: ParsedEdge): void; /** * All edges leaving `nodeId`. */ export declare function getEdgesBySource(db: DatabaseHandle, nodeId: string): Array; /** * All edges arriving at `nodeId`. */ export declare function getEdgesByTarget(db: DatabaseHandle, nodeId: string): Array; /** * Count of edges leaving `nodeId`. */ export declare function countEdgesBySource(db: DatabaseHandle, nodeId: string): number; /** * Count of edges arriving at `nodeId`. */ export declare function countEdgesByTarget(db: DatabaseHandle, nodeId: string): number; /** * Distinct outgoing-neighbour summaries. Title falls back to the target id * when the neighbour is a dangling link (no node row exists for it yet). */ export declare function getEdgeSummariesBySource(db: DatabaseHandle, nodeId: string): Array<{ nodeId: string; title: string; }>; /** * Distinct incoming-neighbour summaries (back-links). */ export declare function getEdgeSummariesByTarget(db: DatabaseHandle, nodeId: string): Array<{ nodeId: string; title: string; }>; /** * Delete every edge leaving `nodeId`. Used when re-indexing a file — the * pipeline wipes old outgoing edges and re-emits from the parsed note. */ export declare function deleteEdgesBySource(db: DatabaseHandle, nodeId: string): void; /** * Delete every edge arriving at `nodeId`. Used when a node itself is removed. */ export declare function deleteEdgesByTarget(db: DatabaseHandle, nodeId: string): void;