MCPcopy Create free account
hub / github.com/actiontech/dtle / CreateDB

Function CreateDB

driver/mysql/sql/sqlutils.go:138–146  ·  view source on GitHub ↗
(mysql_uri string)

Source from the content-addressed store, hash-verified

136}
137
138func CreateDB(mysql_uri string) (*gosql.DB, error) {
139 db, err := gosql.Open("mysql", mysql_uri)
140 if err != nil {
141 return nil, err
142 }
143 db.SetConnMaxLifetime(WaitTimeout * time.Second)
144
145 return db, nil
146}
147
148func CreateConns(ctx context.Context, db *gosql.DB, count int) ([]*Conn, error) {
149 conns := make([]*Conn, count)

Callers 5

initDBConnectionsMethod · 0.92
InitDBMethod · 0.92
listMySQLSchemaFunction · 0.92
listMySQLColumnsFunction · 0.92
connectDatabaseFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected