获取带表前缀的数据表 @param table 数据表
(table string)
| 133 | //获取带表前缀的数据表 |
| 134 | //@param table 数据表 |
| 135 | func getTable(table string) string { |
| 136 | prefix := beego.AppConfig.DefaultString("db::prefix", "hc_") |
| 137 | if !strings.HasPrefix(table, prefix) { |
| 138 | table = prefix + table |
| 139 | } |
| 140 | return table |
| 141 | } |
| 142 | |
| 143 | //根据指定的表和id删除指定的记录,如果在删除记录的时候也删除记录中记录的文件,则不能调用该方法 |
| 144 | //@param table 指定要删除记录的数据表 |
no outgoing calls
no test coverage detected