-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cmd/gf): add DaMeng
database driver support
#3606
Conversation
Certain databases, such as the DM (Dameng) database, enforce the rule that table names and column names must be in uppercase, especially when the database strictly differentiates between uppercase and lowercase. This strict enforcement helps to prevent numerous errors. However, with the current CLI tool, if the table names and column names are in uppercase, the generated struct names and field names will also be in all uppercase letters, which looks quite unattractive. To address this issue, I modified the code to convert all table names and column names to lowercase, resulting in more aesthetically pleasing and readable generated code. 某些数据库(例如达梦数据库)要求表名和字段名严格遵循大写规范,尤其在数据库严格区分大小写的情况下。这种强制性规定避免了许多错误的产生。然而,在当前的CLI工具下,若表名和字段名是大写的,生成的结构体名称和字段名也会全为大写字母,显得非常不美观。为了解决这一问题,我对代码进行了修改,将表名和字段名全部转换为小写,使生成的代码更加美观和易于阅读 |
DaMeng
database driver support
DaMeng
database driver supportDaMeng
database driver support
Insua:master |
2 similar comments
Insua:master |
Insua:master |
1 similar comment
Yas 3 |
Yas 3 |
A first-level heading ## A second-level heading ### A third-level heading |
A first-level heading ## A second-level heading ### A third-level heading |
3 similar comments
A first-level heading ## A second-level heading ### A third-level heading |
A first-level heading ## A second-level heading ### A third-level heading |
A first-level heading ## A second-level heading ### A third-level heading |
0c3ad4cc406..c59ab180f40 100644 |
From e18e926 Mon Sep 17 00:00:00 2001 cmd/gf/go.mod | 1 + diff --git a/cmd/gf/go.mod b/cmd/gf/go.mod
import (
From e0eb117 Mon Sep 17 00:00:00 2001 cmd/gf/internal/cmd/gendao/gendao_dao.go | 8 ++++---- diff --git a/cmd/gf/internal/cmd/gendao/gendao_dao.go b/cmd/gf/internal/cmd/gendao/gendao_dao.go
diff --git a/cmd/gf/internal/cmd/gendao/gendao_do.go b/cmd/gf/internal/cmd/gendao/gendao_do.go
@@ -61,7 +61,7 @@ func generateDo(ctx context.Context, in CGenDaoInternalInput) {
diff --git a/cmd/gf/internal/cmd/gendao/gendao_entity.go b/cmd/gf/internal/cmd/gendao/gendao_entity.go
@@ -44,7 +44,7 @@ func generateEntity(ctx context.Context, in CGenDaoInternalInput) {
diff --git a/cmd/gf/internal/cmd/gendao/gendao_structure.go b/cmd/gf/internal/cmd/gendao/gendao_structure.go
|
The purpose is to be able to use the DM database to build a CLI.