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) <noreply@anthropic.com>
This commit is contained in:
2026-05-09 13:31:08 +02:00
parent 416b15786d
commit aceb10b672
+11
View File
@@ -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
}