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:
@@ -57,3 +57,14 @@ func (db *DB) Drop() error {
|
|||||||
db.Close()
|
db.Close()
|
||||||
return os.Remove(db.path)
|
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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user