MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / MakeOldDB

Function MakeOldDB

pkg/wstore/wstore_dboldmigration.go:23–31  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

21}
22
23func MakeOldDB(ctx context.Context) (*sqlx.DB, error) {
24 dbName := GetOldDBName()
25 rtn, err := sqlx.Open("sqlite3", fmt.Sprintf("file:%s?mode=ro&_busy_timeout=5000", dbName))
26 if err != nil {
27 return nil, err
28 }
29 rtn.DB.SetMaxOpenConns(1)
30 return rtn, nil
31}
32
33type OldHistoryType struct {
34 HistoryId string

Callers 1

GetAllOldHistoryFunction · 0.85

Calls 2

GetOldDBNameFunction · 0.85
OpenMethod · 0.80

Tested by

no test coverage detected