-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: golang example simplify #14890
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: golang example simplify #14890
Conversation
@Icemap: GitHub didn't allow me to request PR reviews from the following users: shizn. Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
title: TiDB 和 GORM 的简单 CRUD 应用程序 | ||
summary: 给出一个 TiDB 和 GORM 的简单 CRUD 应用程序示例。 | ||
title: 使用 GORM 连接到 TiDB | ||
summary: 本文描述了 TiDB 和 GORM 的连接步骤,并给出了简单示例代码片段。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary: 本文描述了 TiDB 和 GORM 的连接步骤,并给出了简单示例代码片段。 | |
summary: 本文描述了 TiDB 和 GORM 的连接步骤,并给出了简单示例代码片段 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
水一个_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样可能水不进去,可以提两个 commits,一个改过去,一个改回来 XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sykp241095: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
```golang | ||
openDB("mysql", func(db *sql.DB) { | ||
insertSQL = "INSERT INTO player (id, coins, goods) VALUES (?, ?, ?)" | ||
_, err := db.Exec(insertSQL, "id", 1, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
第一列 是 "id"?, 这个 player 表好像没有看到建表?
id 还是用数字好一些?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是 sql-driver repository 的代码片段。为了尽量精简文档,建表过程都是没包含在文档内的。
Co-authored-by: sykp241095 <sykp241095@gmail.com>
Signed-off-by: Aolin <aolin.zhang@pingcap.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Oreoxmt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?