[feat] 新增 表结构操作

This commit is contained in:
2025-03-24 16:58:37 +08:00
parent f9ca4a49ce
commit 764eccfafd
14 changed files with 2606 additions and 0 deletions
Executable
+26
View File
@@ -0,0 +1,26 @@
package schema
import (
"strings"
"github.com/samber/lo"
)
func PrefixArray(prefix string, values []string) (items []string) {
for _, value := range values {
items = append(items, prefix+" "+value)
}
return items
}
func QuoteString(value any) string {
switch v := value.(type) {
case []string:
return strings.Join(lo.Map(v, func(item string, _ int) string {
return "'" + item + "'"
}), ", ")
case string:
return "'" + v + "'"
}
return ""
}