/**
 * Abstract Repository base class.
 *
 * Defines the contract for all graph data access. Every method throws
 * "not implemented" by default — concrete subclasses override what they support.
 */
export class Repository {
    // ── Node lookups ────────────────────────────────────────────────────
    findNodeById(_id) {
        throw new Error('not implemented');
    }
    findNodesByFile(_file) {
        throw new Error('not implemented');
    }
    findFileNodes(_fileLike) {
        throw new Error('not implemented');
    }
    findNodesWithFanIn(_namePattern, _opts) {
        throw new Error('not implemented');
    }
    countNodes() {
        throw new Error('not implemented');
    }
    countEdges() {
        throw new Error('not implemented');
    }
    countFiles() {
        throw new Error('not implemented');
    }
    getNodeId(_name, _kind, _file, _line) {
        throw new Error('not implemented');
    }
    getFunctionNodeId(_name, _file, _line) {
        throw new Error('not implemented');
    }
    bulkNodeIdsByFile(_file) {
        throw new Error('not implemented');
    }
    findNodeChildren(_parentId) {
        throw new Error('not implemented');
    }
    findNodesByScope(_scopeName, _opts) {
        throw new Error('not implemented');
    }
    findNodeByQualifiedName(_qualifiedName, _opts) {
        throw new Error('not implemented');
    }
    listFunctionNodes(_opts) {
        throw new Error('not implemented');
    }
    iterateFunctionNodes(_opts) {
        throw new Error('not implemented');
    }
    findNodesForTriage(_opts) {
        throw new Error('not implemented');
    }
    // ── Edge queries ────────────────────────────────────────────────────
    findCallees(_nodeId) {
        throw new Error('not implemented');
    }
    findCallers(_nodeId) {
        throw new Error('not implemented');
    }
    /**
     * Batch version of findCallers — returns callers for multiple node IDs in a
     * single query. Default implementation loops; subclasses override with SQL
     * `IN (...)` for efficiency.
     */
    findCallersBatch(nodeIds) {
        const result = new Map();
        for (const id of nodeIds) {
            const callers = this.findCallers(id);
            if (callers.length > 0)
                result.set(id, callers);
        }
        return result;
    }
    findDistinctCallers(_nodeId) {
        throw new Error('not implemented');
    }
    findAllOutgoingEdges(_nodeId) {
        throw new Error('not implemented');
    }
    findAllIncomingEdges(_nodeId) {
        throw new Error('not implemented');
    }
    findCalleeNames(_nodeId) {
        throw new Error('not implemented');
    }
    findCallerNames(_nodeId) {
        throw new Error('not implemented');
    }
    findImportTargets(_nodeId) {
        throw new Error('not implemented');
    }
    findImportSources(_nodeId) {
        throw new Error('not implemented');
    }
    findImportDependents(_nodeId) {
        throw new Error('not implemented');
    }
    findCrossFileCallTargets(_file) {
        throw new Error('not implemented');
    }
    countCrossFileCallers(_nodeId, _file) {
        throw new Error('not implemented');
    }
    getClassHierarchy(_classNodeId) {
        throw new Error('not implemented');
    }
    findImplementors(_nodeId) {
        throw new Error('not implemented');
    }
    findInterfaces(_nodeId) {
        throw new Error('not implemented');
    }
    findIntraFileCallEdges(_file) {
        throw new Error('not implemented');
    }
    // ── Graph-read queries ──────────────────────────────────────────────
    getCallableNodes() {
        throw new Error('not implemented');
    }
    getCallEdges() {
        throw new Error('not implemented');
    }
    getFileNodesAll() {
        throw new Error('not implemented');
    }
    getImportEdges() {
        throw new Error('not implemented');
    }
    // ── Optional table checks (default: false/undefined) ────────────────
    hasCfgTables() {
        throw new Error('not implemented');
    }
    hasEmbeddings() {
        throw new Error('not implemented');
    }
    hasDataflowTable() {
        throw new Error('not implemented');
    }
    getComplexityForNode(_nodeId) {
        throw new Error('not implemented');
    }
    // ── Convenience queries ──────────────────────────────────────────────
    /**
     * Look up the stored content hash for a file.
     * Returns null when the file is not in file_hashes or the method is
     * not yet implemented on the concrete repository.
     */
    getFileHash(_file) {
        return null;
    }
    /** Check whether the graph contains any 'implements' edges. */
    hasImplementsEdges() {
        return false;
    }
    /** Check whether the co_changes table exists and has data. */
    hasCoChangesTable() {
        return false;
    }
    // ── Composite queries ──────────────────────────────────────────────
    /**
     * Complete fnDeps query in a single call. Returns null when not natively
     * supported — callers should fall back to the JS-orchestrated path.
     */
    fnDeps(_name, _opts) {
        return null;
    }
}
//# sourceMappingURL=base.js.map