MCPcopy Create free account
hub / github.com/cloudwan/gohan / InitDBWithSchemas

Function InitDBWithSchemas

db/db.go:318–325  ·  view source on GitHub ↗

InitDBWithSchemas initializes database using schemas stored in Manager

(dbType, dbConnection string, initDBParams InitDBParams)

Source from the content-addressed store, hash-verified

316
317// InitDBWithSchemas initializes database using schemas stored in Manager
318func InitDBWithSchemas(dbType, dbConnection string, initDBParams InitDBParams) error {
319 aDb, err := ConnectDB(dbType, dbConnection, DefaultMaxOpenConn, options.Default())
320 if err != nil {
321 return err
322 }
323 defer aDb.Close()
324 return InitDBConnWithSchemas(aDb, initDBParams)
325}

Callers

nothing calls this directly

Calls 4

InitDBConnWithSchemasFunction · 0.85
ConnectDBFunction · 0.70
DefaultMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected