Categorygithub.com/Datosystem/gorm
modulepackage
1.23.2
Repository: https://github.com/datosystem/gorm.git
Documentation: pkg.go.dev

# README

GORM

The fantastic ORM library for Golang, aims to be developer friendly.

go report card test status MIT license Go.Dev reference

Overview

  • Full-Featured ORM
  • Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance)
  • Hooks (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 Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr
  • Composite Primary Key
  • Auto Migrations
  • Logger
  • Extendable, flexible plugin API: Database Resolver (Multiple Databases, Read/Write Splitting) / Prometheus…
  • Every feature comes with tests
  • Developer Friendly

Getting Started

Contributing

You can help to deliver a better GORM, check out things you can do

Contributors

Thank you for contributing to the GORM framework!

Contributors

License

© Jinzhu, 2013~time.Now

Released under the MIT License

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Expr returns clause.Expr, which can be used to pass SQL expression as params.
Open initialize db session based on dialector.
Scan scan rows into db statement.

# Constants

# Variables

ErrDryRunModeUnsupported dry run mode unsupported.
ErrEmptySlice empty slice found.
ErrInvalidData unsupported data.
ErrInvalidDB invalid db.
ErrInvalidField invalid field.
ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`.
ErrInvalidValue invalid value.
ErrInvalidValueOfLength invalid values do not match length.
ErrMissingWhereClause missing where clause.
ErrModelAccessibleFieldsRequired model accessible fields required.
ErrModelValueRequired model value required.
ErrNotImplemented not implemented.
ErrPreloadNotAllowed preload is not allowed when count is used.
ErrPrimaryKeyRequired primary keys required.
ErrRecordNotFound record not found error.
ErrRegistered registered.
ErrUnsupportedDriver unsupported driver.
ErrUnsupportedRelation unsupported relations.

# Structs

Association Mode contains some helper methods to handle relationship things easily.
Config GORM config.
DB GORM DB definition.
Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt It may be embedded into your model or you may build your own model without it type User struct { gorm.Model }.
No description provided by the author
No description provided by the author
Session session config when create session with Session() method.
No description provided by the author
No description provided by the author
No description provided by the author
Statement statement.
No description provided by the author
ViewOption view option.

# Interfaces

ColumnType column type interface.
ConnPool db conns pool interface.
ConnPoolBeginner conn pool beginner.
Dialector GORM database dialector.
GetDBConnector SQL db connector.
No description provided by the author
Migrator migrator interface.
Option gorm option interface.
No description provided by the author
Plugin GORM plugin interface.
Rows rows interface.
SavePointerDialectorInterface save pointer interface.
StatementModifier statement modifier interface.
Tx sql.Tx interface.
TxBeginner tx beginner.
TxCommitter tx committer.
Valuer gorm valuer interface.

# Type aliases

No description provided by the author
ScanMode scan data mode.