Azpect3120 b5159e8976 FEAT: Support for mysql and mariadb!!
However, the enum tree is not supported since they do not support them.
But other than that, mysql and maria DB seem to both be supported.
2024-08-19 17:26:19 -07:00

32 lines
858 B
Go

package templates
import "fmt"
const TABLE_TREE_ERROR_BODY string = `
<li class="py-2">
<p class="text-xs text-red-500">Error Loading Tables: %s</p>
</li>
`
const ENUM_TREE_ERROR_BODY string = `
<li class="py-2">
<p class="text-xs text-red-500">Error Loading Tables: %s</p>
</li>
`
// When an error occurs while generating the table tree,
// this function will return the HTML for the error message.
func TableTreeError(err error) string {
var html string = TABLE_TREE_OPEN
html += fmt.Sprintf(TABLE_TREE_ERROR_BODY, err.Error())
return html + TABLE_TREE_CLOSE
}
// When an error occurs while generating the enum tree,
// this function will return the HTML for the error message.
func EnumTreeError(err error) string {
var html string = ENUM_TREE_OPEN
html += fmt.Sprintf(ENUM_TREE_ERROR_BODY, err.Error())
return html + ENUM_TREE_CLOSE
}