DropAllTables drops all tables from this database
(database string)
| 81 | |
| 82 | // DropAllTables drops all tables from this database |
| 83 | func (mdb *db) DropAllTables(database string) error { |
| 84 | tables, err := mdb.ListTables(database) |
| 85 | if err != nil { |
| 86 | return err |
| 87 | } |
| 88 | for _, tab := range tables { |
| 89 | if err := mdb.DropTable(tab); err != nil { |
| 90 | return err |
| 91 | } |
| 92 | } |
| 93 | return nil |
| 94 | } |
| 95 | |
| 96 | // CreateDatabase creates a database if it doesn't exist |
| 97 | func (mdb *db) CreateDatabase(name string) error { |
nothing calls this directly
no test coverage detected