DeleteTable drops the specified table. This method is a no-op if a table with the provided name doesn't exist. NB! Be aware that this method is vulnerable to SQL injection and the "dangerousTableName" argument must come only from trusted input!
(dangerousTableName string)
| 87 | // NB! Be aware that this method is vulnerable to SQL injection and the |
| 88 | // "dangerousTableName" argument must come only from trusted input! |
| 89 | func (app *BaseApp) DeleteTable(dangerousTableName string) error { |
| 90 | _, err := app.NonconcurrentDB().NewQuery(fmt.Sprintf( |
| 91 | "DROP TABLE IF EXISTS {{%s}}", |
| 92 | dangerousTableName, |
| 93 | )).Execute() |
| 94 | |
| 95 | return err |
| 96 | } |
| 97 | |
| 98 | // HasTable checks if a table (or view) with the provided name exists (case insensitive). |
| 99 | // in the data.db. |
nothing calls this directly
no test coverage detected