gorm/README_CN.md
2024-04-14 00:10:50 +08:00

55 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# GORM
为 Golang 设计的出色 ORM 库,旨在使开发人员更加友好地开发
[![去报告卡](https://camo.githubusercontent.com/f11e6cf2e617c26212fc0ba1c280effd9838daeaf3f4177566e7ab736a5eec6c/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f676f2d676f726d2f676f726d)](https://goreportcard.com/report/github.com/go-gorm/gorm) [![测试状态](https://github.com/go-gorm/gorm/workflows/tests/badge.svg?branch=master)](https://github.com/go-gorm/gorm/actions) [![麻省理工学院许可证](https://camo.githubusercontent.com/b5241c02eaadcf18b16b74247e96df65b377f820ef4ff4109b77f689ed0963d2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://opensource.org/licenses/MIT) [![Go.Dev 参考](https://camo.githubusercontent.com/d9c8c216896231065f3aed3efe680fb59e56a8a5d078a6d513ff6d178b512bb1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f676f2e6465762d7265666572656e63652d626c75653f6c6f676f3d676f266c6f676f436f6c6f723d7768697465)](https://pkg.go.dev/gorm.io/gorm?tab=doc)
[**🌎English Documentation**](./README.md)
## 概述
- 对象关联Has One、Has Many、Belongs To、Many To Many、Polymorphism、Single-table inheritance
- 钩子函数Before/After Create/Save/Update/Delete/Find
- 预加载和连接查询Eager loading with Preload, Joins
- 事务Transactions、嵌套事务Nested Transactions、保存点Save Point、回滚到保存点RollbackTo to Saved Point
- 上下文Context、预编译语句模式Prepared Statement Mode、空运行DryRun Mode
- 批量插入Batch Insert、批量查找FindInBatches、转换为映射Find To Map
- SQL 构建器SQL Builder、更新/插入Upsert、锁定Locking、优化器/索引/注释提示Optimizer/Index/Comment Hints、命名参数NamedArg、带有 SQL 表达式的搜索/更新/创建Search/Update/Create with SQL Expr
- 复合主键Composite Primary Key
- 自动迁移Auto Migrations
- 日志记录器Logger
- 可扩展、灵活的插件 API数据库解析器Database Resolver支持多数据库、读写分离/ Prometheus…
- 每个特性都附带测试
- 开发者友好Developer Friendly
## 入门
- GORM 指南 [https://gorm.io](https://gorm.io/)
- 生成指南 https://gorm.io/gen/index.html
## 贡献
[您可以帮助交付更好的 GORM查看您可以做的事情](https://gorm.io/contribute.html)
## 贡献者
[感谢您](https://github.com/go-gorm/gorm/graphs/contributors)对 GORM 框架的贡献!
## 执照
© Jinzhu, 2013~time.Now
根据[MIT 许可证发布](https://github.com/go-gorm/gorm/blob/master/LICENSE)