Skip to content
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

Merged
merged 3 commits into from
May 30, 2024
Merged

Conversation

Insua
Copy link
Contributor

@Insua Insua commented May 24, 2024

The purpose is to be able to use the DM database to build a CLI.

@Insua
Copy link
Contributor Author

Insua commented May 29, 2024

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工具下,若表名和字段名是大写的,生成的结构体名称和字段名也会全为大写字母,显得非常不美观。为了解决这一问题,我对代码进行了修改,将表名和字段名全部转换为小写,使生成的代码更加美观和易于阅读

@gqcn gqcn changed the title cmd/gf:Add DaMeng database drive to gf-cli cmd/gf: add DaMeng database driver support May 30, 2024
@gqcn gqcn merged commit bd8d046 into gogf:master May 30, 2024
23 checks passed
@gqcn gqcn changed the title cmd/gf: add DaMeng database driver support feat(cmd/gf): add DaMeng database driver support Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants