Save All Fields Update single column Updates multiple columns Update Selected Fields Update Hooks Batch Updates Block Global Updates Updated Records Count Advanced Update w...
特性 安装 快速入门 The fantastic ORM library for Golang aims to be developer friendly. 特性 全功能 ORM 关联 (Has One,Has Many,Belongs To,Many To Many,多态,单表继承) Create,Save,Update,Delete,Fin...
Method Categories Chain Methods Finisher Methods New Session Methods Reusability and Safety Example of Unsafe Reuse 安全再利用的例子 Examples for Clarity GORM 的方法链功能可实现平滑流畅的编码风格。 ...
Register Serializer Customized Serializer Type Serializer is an extensible interface that allows to customize how to serialize and deserialize data with database. GORM provides...
v2.0 - 2020.08 v1.0 - 2016.04 v2.0 - 2020.08 GORM 2.0 is a rewrite from scratch, it introduces some incompatible-API change and many improvements Performance Improvements Mod...
Set multiple fields as primary key creates composite primary key, for example: type Product struct { ID string `gorm:"primaryKey"` LanguageCode strin...
Set / Get InstanceSet / InstanceGet GORM 提供了 Set , Get , InstanceSet , InstanceGet 方法来允许用户传值给 勾子 或其他方法 Gorm 中有一些特性用到了这种机制,如迁移表格时传递表格选项。 // 创建表时添加表后缀 db . Set ( "gorm:table...