Skip to content

Commit

Permalink
Merge pull request #8542 from dolthub/liuliu/pass-databaseName-to-Dol…
Browse files Browse the repository at this point in the history
…tDBFromCS

liuliu/return databasename
  • Loading branch information
liuliu-dev authored Nov 7, 2024
2 parents e0bb687 + cc3c252 commit f94b1ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/libraries/doltcore/doltdb/doltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ func DoltDBFromCS(cs chunks.ChunkStore, databaseName string) *DoltDB {
return &DoltDB{db: hooksDatabase{Database: db}, vrw: vrw, ns: ns, databaseName: databaseName}
}

// GetDatabaseName returns the name of the database.
// Note: This can return an empty string if the database name is not populated.
func (ddb *DoltDB) GetDatabaseName() string {
return ddb.databaseName
}

// HackDatasDatabaseFromDoltDB unwraps a DoltDB to a datas.Database.
// Deprecated: only for use in dolt migrate.
func HackDatasDatabaseFromDoltDB(ddb *DoltDB) datas.Database {
Expand Down

0 comments on commit f94b1ea

Please sign in to comment.