MCPcopy Create free account
hub / github.com/temporalio/temporal / CreateDatabase

Method CreateDatabase

common/persistence/sql/sqlplugin/postgresql/admin.go:118–127  ·  view source on GitHub ↗

CreateDatabase creates a database if it doesn't exist

(name string)

Source from the content-addressed store, hash-verified

116
117// CreateDatabase creates a database if it doesn't exist
118func (pdb *db) CreateDatabase(name string) error {
119 if err := pdb.Exec(fmt.Sprintf(createDatabaseQuery, name)); err != nil {
120 if pdb.IsDupDatabaseError(err) {
121 return nil
122 }
123 return err
124 }
125
126 return nil
127}
128
129// DropDatabase drops a database
130func (pdb *db) DropDatabase(name string) error {

Callers

nothing calls this directly

Calls 2

ExecMethod · 0.95
IsDupDatabaseErrorMethod · 0.95

Tested by

no test coverage detected