DropAllTables drops all tables from this database
(database string)
| 101 | |
| 102 | // DropAllTables drops all tables from this database |
| 103 | func (mdb *db) DropAllTables(database string) error { |
| 104 | tables, err := mdb.ListTables(database) |
| 105 | if err != nil { |
| 106 | return err |
| 107 | } |
| 108 | for _, tab := range tables { |
| 109 | if err := mdb.DropTable(tab); err != nil { |
| 110 | return err |
| 111 | } |
| 112 | } |
| 113 | return nil |
| 114 | } |
| 115 | |
| 116 | // CreateDatabase creates a database if it doesn't exist |
| 117 | func (mdb *db) CreateDatabase(name string) error { |
nothing calls this directly
no test coverage detected