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

drivers/pgsql:pgsql returning id should use quotation marks,when primary key is capital #3637

Closed
wants to merge 2 commits into from

Conversation

Insua
Copy link
Contributor

@Insua Insua commented Jun 7, 2024

When the field name in pgsql is uppercase, the field must be enclosed in quotation marks; otherwise, an error will occur indicating that the field cannot be found. Therefore, a modification was made to change it to RETURNING "ID" in this style.

当pgsql的字段名大写时,必须把字段用"给引用起来,否则会报错,提示找不到字段,所以作出修改,改成了 RETURNING "ID",这种样式。

@@ -86,6 +86,7 @@ CONFIGURATION SUPPORT
CGenDaoBriefClear = `delete all generated go files that do not exist in database`
CGenDaoBriefTypeMapping = `custom local type mapping for generated struct attributes relevant to fields of table`
CGenDaoBriefFieldMapping = `custom local type mapping for generated struct attributes relevant to specific fields of table`
CGenDaoBriefWithPathPackage = `is should make the dao package by the path`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些修改与 #3618 重复,建议从主分支新开分支单独修改pgsqlRETURNING "ID"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用新的分支提交了,现在只有一个commit了
新pr是 #3638

@Insua Insua closed this Jun 12, 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