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

Debug TiDB Documentation: 使用 Prisma 连接到 TiDB #16062

Closed
Tracked by #15772
qiancai opened this issue Jan 9, 2024 · 4 comments · Fixed by #16135
Closed
Tracked by #15772

Debug TiDB Documentation: 使用 Prisma 连接到 TiDB #16062

qiancai opened this issue Jan 9, 2024 · 4 comments · Fixed by #16135
Assignees
Labels
2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event.

Comments

@qiancai
Copy link
Collaborator

qiancai commented Jan 9, 2024

此 issue 为 Debug TiDB Documentation: TiDB 中文文档测试说明・Issue #15772・pingcap/docs-cn 的 sub-issue,目的是为了测试和验证使用 Prisma 连接到 TiDB 文档。

请参考 #15772 中的说明测试该文档。

  1. 在完成文档验证后,将您的验证结果以评论的形式添加到当前 issue 上。验证结果可以是您遇到的问题、发现的错误或其他任何发现。如果验证顺利通过,您也可以添加评论说明。
  2. 对于在验证过程中发现的任何问题或错误,欢迎创建 Pull Request(PR)直接修正文档。创建 PR 时,请在 PR 描述中指明该 PR 解决了哪个 issue (例如,Fix #16062)。关于如何创建 PR 的详情,请参考TiDB 中文文档贡献指南

非常感谢您对测试和验证文档的贡献!

@hey-hoho
Copy link
Contributor

/assign

@hey-hoho
Copy link
Contributor

结果验证通过,符合预期。

E:\heao\git\tidb-example\tidb-nodejs-prisma-quickstart>npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma

Applying migration `20230828153207_init`

The following migration(s) have been applied:

migrations/
  └─ 20230828153207_init/
    └─ migration.sql

Your database is now in sync with your schema.

✔ Generated Prisma Client (v5.1.1) to .\node_modules\@prisma\client in 77ms
E:\heao\git\tidb-example\tidb-nodejs-prisma-quickstart>npm start

> [email protected] start
> ts-node src/index.ts

🔌 Connected to TiDB cluster! (TiDB version: 5.7.25-TiDB-v7.1.0)
🆕 Created a new player with ID 1.
ℹ️ Got Player 1: Player { id: 1, coins: 100, goods: 100 }
🔢 Added 50 coins and 50 goods to player 1, now player 1 has 150 coins and 150 goods.
🚮 Player 1 has been deleted.

@hey-hoho
Copy link
Contributor

为保证参数格式与其他示例程序、文档保持一致,建议.env的参数值统一在外层使用''

修复PR如下:
#16135
tidb-samples/tidb-nodejs-prisma-quickstart#2

@qiancai
Copy link
Collaborator Author

qiancai commented Jan 31, 2024

@hey-hoho 非常感谢您对使用 Prisma 连接到 TiDB 文档的测试❤️。因为测试后创建的文档修改 PR #16135 已合并,此 issue 已自动关闭。如果后续您再遇到任何文档问题,欢迎在此文档仓库提 issue 或者 PR 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event.
Development

Successfully merging a pull request may close this issue.

2 participants