书栈网 · BookStack 本次搜索耗时 0.024 秒,为您找到 718 个相关结果.
  • Has One

    Has One Declare Retrieve Override Foreign Key Override References CRUD with Has One Eager Loading Self-Referential Has One FOREIGN KEY Constraints Has One A has one ass...
  • 自定义数据类型

    实现自定义数据类型 Scanner / Valuer GormDataTypeInterface GormValuerInterface 使用 SQL 表达式进行 Create/Update 基于 Context 的值 条件表达式 自定义数据类型集合 GORM 提供了少量接口,使用户能够为 GORM 定义支持的数据类型,这里以 json ...
  • Error Handling

    Basic Error Handling ErrRecordNotFound Handling Error Codes Dialect Translated Errors Errors Effective error handling is a cornerstone of robust application development in G...
  • Has Many

    Has Many Has Many 重写外键 重写引用 多态关联 Has Many 的 CURD 预加载 自引用 Has Many 外键约束 Has Many Has Many has many 与另一个模型建立了一对多的连接。 不同于 has one ,拥有者可以有零或多个关联模型。 例如,您的应用包含 user 和 cre...
  • Prometheus

    Usage User-Defined Metrics MySQL GORM provides Prometheus plugin to collect DBStats or user-defined metrics https://github.com/go-gorm/prometheus Usage import ( "go...
  • Database Resolver

    用法 自动切换连接 读写分离 手动切换连接 事务 负载均衡 连接池 DBResolver 为 GORM 提供了多个数据库支持,支持以下功能: 支持多个 sources、replicas 读写分离 根据工作表、struct 自动切换连接 手动切换连接 Sources/Replicas 负载均衡 适用于原生 SQL 事务 https://g...
  • Connecting to MatrixOne with Golang

    Connecting to MatrixOne with Golang Before you start Using Golang to connect to MatrixOne Using Gorm to connect to MatrixOne Reference Connecting to MatrixOne with Golang Ma...
  • Performance

    Disable Default Transaction Caches Prepared Statement SQL Builder with PreparedStmt Select Fields Iteration / FindInBatches Index Hints Read/Write Splitting GORM optimizes ...
  • Hooks

    Object Life Cycle Hooks Creating an object Updating an object Deleting an object Querying an object Modify current operation Object Life Cycle Hooks are functions that are...
  • Migration

    Auto Migration Migrator Interface CurrentDatabase Tables Columns Views Constraints Indexes Constraints Atlas Integration Other Migration Tools Auto Migration Automatic...