DeleteView drops the specified view name. This method is a no-op if a view with the provided name doesn't exist. NB! Be aware that this method is vulnerable to SQL injection and the "dangerousViewName" argument must come only from trusted input!
(dangerousViewName string)
| 22 | // NB! Be aware that this method is vulnerable to SQL injection and the |
| 23 | // "dangerousViewName" argument must come only from trusted input! |
| 24 | func (app *BaseApp) DeleteView(dangerousViewName string) error { |
| 25 | _, err := app.DB().NewQuery(fmt.Sprintf( |
| 26 | "DROP VIEW IF EXISTS {{%s}}", |
| 27 | dangerousViewName, |
| 28 | )).Execute() |
| 29 | |
| 30 | return err |
| 31 | } |
| 32 | |
| 33 | // SaveView creates (or updates already existing) persistent SQL view. |
| 34 | // |