add: 支持直接根据 sqlite 注释生成 orm

This commit is contained in:
yuanzhao
2024-03-13 11:30:20 +08:00
parent ddb7aceae8
commit 8409038b3b
+1 -1
View File
@@ -57,7 +57,7 @@ func GenSqlite(table string, goType parser.GoType, out string) {
var baseFunStr string
baseFunStr = strings.ReplaceAll(baseMysqlFuncStr,
"tx = providers.GetBean(\"mysql, {db}\").(*gorm.DB).Model(&MysqlTableName{})",
"tx = DB()")
"tx = DB().Model(&MysqlTableName{})")
for old, newStr := range map[string]string{
"MysqlTableName": parser.StringToHump(table),
"{table_name}": table,