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