From 12b37b9a05c1746fc54cae1e60ef84de2b86f626 Mon Sep 17 00:00:00 2001 From: Egutierrez Date: Sat, 9 May 2026 13:31:08 +0200 Subject: [PATCH] feat(registry): expose Conn() and Path() on registry.DB Allows external readers (registry_mcp app) to issue raw aggregations (e.g. fn_list_domains) and inspect the active db path without duplicating the connection setup logic. Co-Authored-By: Claude Opus 4.7 (1M context) --- registry/db.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/registry/db.go b/registry/db.go index f4aa12e5..bac6f8d9 100644 --- a/registry/db.go +++ b/registry/db.go @@ -57,3 +57,14 @@ func (db *DB) Drop() error { db.Close() return os.Remove(db.path) } + +// Conn returns the underlying *sql.DB for callers that need raw SQL access +// (e.g. registry_mcp for aggregations not covered by Search/Get helpers). +func (db *DB) Conn() *sql.DB { + return db.conn +} + +// Path returns the filesystem path of the database file. +func (db *DB) Path() string { + return db.path +}