package gorm

Import Path
	gorm.io/gorm (on go.dev)

Dependency Relation
	imports 17 packages, and imported by 4 packages

Involved Source Files
	    association.go
	    callbacks.go
	    chainable_api.go
	    errors.go
	    finisher_api.go
	    gorm.go
	    interfaces.go
	    migrator.go
	    model.go
	    prepare_stmt.go
	    scan.go
	    soft_delete.go
	    statement.go

Exported Type Names

type Association (struct) Association Mode contains some helper methods to handle relationship things easily. DB *DB Error error Relationship *schema.Relationship (*T) Append(values ...interface{}) error (*T) Clear() error (*T) Count() (count int64) (*T) Delete(values ...interface{}) error (*T) Find(out interface{}, conds ...interface{}) error (*T) Replace(values ...interface{}) error func (*DB).Association(column string) *Association
type ColumnType (interface) (T) DatabaseTypeName() string (T) DecimalSize() (precision int64, scale int64, ok bool) (T) Length() (length int64, ok bool) (T) Name() string (T) Nullable() (nullable bool, ok bool) gorm.io/driver/mysql.Column database/sql.(*ColumnType) func Migrator.ColumnTypes(dst interface{}) ([]ColumnType, error) func gorm.io/gorm/migrator.Migrator.ColumnTypes(value interface{}) (columnTypes []ColumnType, err error) func gorm.io/driver/mysql.Migrator.ColumnTypes(value interface{}) (columnTypes []ColumnType, err error) func Migrator.MigrateColumn(dst interface{}, field *schema.Field, columnType ColumnType) error func gorm.io/gorm/migrator.Migrator.MigrateColumn(value interface{}, field *schema.Field, columnType ColumnType) error
type ConnPool (interface) ConnPool db conns pool interface (T) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) (T) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) (T) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) (T) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row *PreparedStmtDB *PreparedStmtTX database/sql.(*Conn) database/sql.(*DB) database/sql.(*Tx) func ConnPoolBeginner.BeginTx(ctx context.Context, opts *sql.TxOptions) (ConnPool, error) func (*PreparedStmtDB).BeginTx(ctx context.Context, opt *sql.TxOptions) (ConnPool, error)
type ConnPoolBeginner (interface) (T) BeginTx(ctx context.Context, opts *sql.TxOptions) (ConnPool, error) *PreparedStmtDB
type DB (struct) DB GORM DB definition Config *Config Config.AllowGlobalUpdate bool Config.ClauseBuilders map[string]clause.ClauseBuilder Config.ConnPool ConnPool Config.Dialector Dialector Config.DisableAutomaticPing bool Config.DisableForeignKeyConstraintWhenMigrating bool Config.DryRun bool Config.FullSaveAssociations bool Config.Logger logger.Interface Config.NamingStrategy schema.Namer Config.NowFunc func() time.Time Config.Plugins map[string]Plugin Config.PrepareStmt bool Config.SkipDefaultTransaction bool Error error RowsAffected int64 Statement *Statement (*T) AddError(err error) error (*T) Assign(attrs ...interface{}) (tx *DB) (*T) Association(column string) *Association (*T) Attrs(attrs ...interface{}) (tx *DB) (*T) AutoMigrate(dst ...interface{}) error (*T) Begin(opts ...*sql.TxOptions) *DB (T) BindVarTo(writer clause.Writer, stmt *Statement, v interface{}) (*T) Callback() *callbacks (*T) Clauses(conds ...clause.Expression) (tx *DB) (*T) Commit() *DB (*T) Count(count *int64) (tx *DB) (*T) Create(value interface{}) (tx *DB) (*T) DB() (*sql.DB, error) (T) DataTypeOf(*schema.Field) string (*T) Debug() (tx *DB) (T) DefaultValueOf(*schema.Field) clause.Expression (*T) Delete(value interface{}, conds ...interface{}) (tx *DB) (*T) Distinct(args ...interface{}) (tx *DB) (*T) Exec(sql string, values ...interface{}) (tx *DB) (T) Explain(sql string, vars ...interface{}) string (*T) Find(dest interface{}, conds ...interface{}) (tx *DB) (*T) FindInBatches(dest interface{}, batchSize int, fc func(tx *DB, batch int) error) (tx *DB) (*T) First(dest interface{}, conds ...interface{}) (tx *DB) (*T) FirstOrCreate(dest interface{}, conds ...interface{}) (tx *DB) (*T) FirstOrInit(dest interface{}, conds ...interface{}) (tx *DB) (*T) Get(key string) (interface{}, bool) (*T) Group(name string) (tx *DB) (*T) Having(query interface{}, args ...interface{}) (tx *DB) (T) Initialize(*DB) error (*T) InstanceGet(key string) (interface{}, bool) (*T) InstanceSet(key string, value interface{}) *DB (*T) Joins(query string, args ...interface{}) (tx *DB) (*T) Last(dest interface{}, conds ...interface{}) (tx *DB) (*T) Limit(limit int) (tx *DB) (*T) Migrator() Migrator (*T) Model(value interface{}) (tx *DB) (T) Name() string (*T) Not(query interface{}, args ...interface{}) (tx *DB) (*T) Offset(offset int) (tx *DB) (*T) Omit(columns ...string) (tx *DB) (*T) Or(query interface{}, args ...interface{}) (tx *DB) (*T) Order(value interface{}) (tx *DB) (*T) Pluck(column string, dest interface{}) (tx *DB) (*T) Preload(query string, args ...interface{}) (tx *DB) (T) QuoteTo(clause.Writer, string) (*T) Raw(sql string, values ...interface{}) (tx *DB) (*T) Rollback() *DB (*T) RollbackTo(name string) *DB (*T) Row() *sql.Row (*T) Rows() (*sql.Rows, error) (*T) Save(value interface{}) (tx *DB) (*T) SavePoint(name string) *DB (*T) Scan(dest interface{}) (tx *DB) (*T) ScanRows(rows *sql.Rows, dest interface{}) error (*T) Scopes(funcs ...func(*DB) *DB) *DB (*T) Select(query interface{}, args ...interface{}) (tx *DB) (*T) Session(config *Session) *DB (*T) Set(key string, value interface{}) *DB (*T) SetupJoinTable(model interface{}, field string, joinTable interface{}) error (*T) Table(name string, args ...interface{}) (tx *DB) (*T) Take(dest interface{}, conds ...interface{}) (tx *DB) (*T) Transaction(fc func(tx *DB) error, opts ...*sql.TxOptions) (err error) (*T) Unscoped() (tx *DB) (*T) Update(column string, value interface{}) (tx *DB) (*T) UpdateColumn(column string, value interface{}) (tx *DB) (*T) UpdateColumns(values interface{}) (tx *DB) (*T) Updates(values interface{}) (tx *DB) (*T) Use(plugin Plugin) (err error) (*T) Where(query interface{}, args ...interface{}) (tx *DB) (*T) WithContext(ctx context.Context) *DB T : Plugin func Open(dialector Dialector, config *Config) (db *DB, err error) func (*DB).Assign(attrs ...interface{}) (tx *DB) func (*DB).Attrs(attrs ...interface{}) (tx *DB) func (*DB).Begin(opts ...*sql.TxOptions) *DB func (*DB).Clauses(conds ...clause.Expression) (tx *DB) func (*DB).Commit() *DB func (*DB).Count(count *int64) (tx *DB) func (*DB).Create(value interface{}) (tx *DB) func (*DB).Debug() (tx *DB) func (*DB).Delete(value interface{}, conds ...interface{}) (tx *DB) func (*DB).Distinct(args ...interface{}) (tx *DB) func (*DB).Exec(sql string, values ...interface{}) (tx *DB) func (*DB).Find(dest interface{}, conds ...interface{}) (tx *DB) func (*DB).FindInBatches(dest interface{}, batchSize int, fc func(tx *DB, batch int) error) (tx *DB) func (*DB).First(dest interface{}, conds ...interface{}) (tx *DB) func (*DB).FirstOrCreate(dest interface{}, conds ...interface{}) (tx *DB) func (*DB).FirstOrInit(dest interface{}, conds ...interface{}) (tx *DB) func (*DB).Group(name string) (tx *DB) func (*DB).Having(query interface{}, args ...interface{}) (tx *DB) func (*DB).InstanceSet(key string, value interface{}) *DB func (*DB).Joins(query string, args ...interface{}) (tx *DB) func (*DB).Last(dest interface{}, conds ...interface{}) (tx *DB) func (*DB).Limit(limit int) (tx *DB) func (*DB).Model(value interface{}) (tx *DB) func (*DB).Not(query interface{}, args ...interface{}) (tx *DB) func (*DB).Offset(offset int) (tx *DB) func (*DB).Omit(columns ...string) (tx *DB) func (*DB).Or(query interface{}, args ...interface{}) (tx *DB) func (*DB).Order(value interface{}) (tx *DB) func (*DB).Pluck(column string, dest interface{}) (tx *DB) func (*DB).Preload(query string, args ...interface{}) (tx *DB) func (*DB).Raw(sql string, values ...interface{}) (tx *DB) func (*DB).Rollback() *DB func (*DB).RollbackTo(name string) *DB func (*DB).Save(value interface{}) (tx *DB) func (*DB).SavePoint(name string) *DB func (*DB).Scan(dest interface{}) (tx *DB) func (*DB).Scopes(funcs ...func(*DB) *DB) *DB func (*DB).Select(query interface{}, args ...interface{}) (tx *DB) func (*DB).Session(config *Session) *DB func (*DB).Set(key string, value interface{}) *DB func (*DB).Table(name string, args ...interface{}) (tx *DB) func (*DB).Take(dest interface{}, conds ...interface{}) (tx *DB) func (*DB).Unscoped() (tx *DB) func (*DB).Update(column string, value interface{}) (tx *DB) func (*DB).UpdateColumn(column string, value interface{}) (tx *DB) func (*DB).UpdateColumns(values interface{}) (tx *DB) func (*DB).Updates(values interface{}) (tx *DB) func (*DB).Where(query interface{}, args ...interface{}) (tx *DB) func (*DB).WithContext(ctx context.Context) *DB func fs5-gestiondesocios-backend/src/api/utils.GetConnection() *DB func Scan(rows *sql.Rows, db *DB, initialized bool) func Dialector.Initialize(*DB) error func Dialector.Migrator(db *DB) Migrator func Plugin.Initialize(*DB) error func SavePointerDialectorInterface.RollbackTo(tx *DB, name string) error func SavePointerDialectorInterface.SavePoint(tx *DB, name string) error func Valuer.GormValue(context.Context, *DB) clause.Expr func gorm.io/gorm/callbacks.AfterCreate(db *DB) func gorm.io/gorm/callbacks.AfterDelete(db *DB) func gorm.io/gorm/callbacks.AfterQuery(db *DB) func gorm.io/gorm/callbacks.AfterUpdate(db *DB) func gorm.io/gorm/callbacks.BeforeCreate(db *DB) func gorm.io/gorm/callbacks.BeforeDelete(db *DB) func gorm.io/gorm/callbacks.BeforeUpdate(db *DB) func gorm.io/gorm/callbacks.BeginTransaction(db *DB) func gorm.io/gorm/callbacks.BuildQuerySQL(db *DB) func gorm.io/gorm/callbacks.CommitOrRollbackTransaction(db *DB) func gorm.io/gorm/callbacks.CreateWithReturning(db *DB) func gorm.io/gorm/callbacks.Delete(db *DB) func gorm.io/gorm/callbacks.DeleteBeforeAssociations(db *DB) func gorm.io/gorm/callbacks.Preload(db *DB) func gorm.io/gorm/callbacks.Query(db *DB) func gorm.io/gorm/callbacks.RawExec(db *DB) func gorm.io/gorm/callbacks.RegisterDefaultCallbacks(db *DB, config *callbacks.Config) func gorm.io/gorm/callbacks.RowQuery(db *DB) func gorm.io/gorm/callbacks.SaveAfterAssociations(db *DB) func gorm.io/gorm/callbacks.SaveBeforeAssociations(db *DB) func gorm.io/gorm/callbacks.SetupUpdateReflectValue(db *DB) func gorm.io/gorm/callbacks.Update(db *DB) func gorm.io/gorm/callbacks.AfterCreateInterface.AfterCreate(*DB) error func gorm.io/gorm/callbacks.AfterDeleteInterface.AfterDelete(*DB) error func gorm.io/gorm/callbacks.AfterFindInterface.AfterFind(*DB) error func gorm.io/gorm/callbacks.AfterSaveInterface.AfterSave(*DB) error func gorm.io/gorm/callbacks.AfterUpdateInterface.AfterUpdate(*DB) error func gorm.io/gorm/callbacks.BeforeCreateInterface.BeforeCreate(*DB) error func gorm.io/gorm/callbacks.BeforeDeleteInterface.BeforeDelete(*DB) error func gorm.io/gorm/callbacks.BeforeSaveInterface.BeforeSave(*DB) error func gorm.io/gorm/callbacks.BeforeUpdateInterface.BeforeUpdate(*DB) error func gorm.io/gorm/migrator.GormDataTypeInterface.GormDBDataType(*DB, *schema.Field) string func gorm.io/driver/mysql.Update(db *DB) func gorm.io/driver/mysql.Dialector.Initialize(db *DB) (err error) func gorm.io/driver/mysql.Dialector.Migrator(db *DB) Migrator func gorm.io/driver/mysql.Dialector.RollbackTo(tx *DB, name string) error func gorm.io/driver/mysql.Dialector.SavePoint(tx *DB, name string) error
type DeletedAt sql.NullTime (struct) Time time.Time Valid bool (T) DeleteClauses(f *schema.Field) []clause.Interface (T) MarshalJSON() ([]byte, error) (T) QueryClauses(f *schema.Field) []clause.Interface (*T) Scan(value interface{}) error (*T) UnmarshalJSON(b []byte) error (T) Value() (driver.Value, error) T : gorm.io/gorm/schema.DeleteClausesInterface T : gorm.io/gorm/schema.QueryClausesInterface *T : database/sql.Scanner T : database/sql/driver.Valuer T : encoding/json.Marshaler *T : encoding/json.Unmarshaler
type Dialector (interface) Dialector GORM database dialector (T) BindVarTo(writer clause.Writer, stmt *Statement, v interface{}) (T) DataTypeOf(*schema.Field) string (T) DefaultValueOf(*schema.Field) clause.Expression (T) Explain(sql string, vars ...interface{}) string (T) Initialize(*DB) error (T) Migrator(db *DB) Migrator (T) Name() string (T) QuoteTo(clause.Writer, string) Config gorm.io/gorm/migrator.Config gorm.io/gorm/migrator.Migrator gorm.io/driver/mysql.Dialector T : Plugin func gorm.io/driver/mysql.New(config mysql.Config) Dialector func gorm.io/driver/mysql.Open(dsn string) Dialector func Open(dialector Dialector, config *Config) (db *DB, err error)
type Migrator (interface) (T) AddColumn(dst interface{}, field string) error (T) AlterColumn(dst interface{}, field string) error (T) AutoMigrate(dst ...interface{}) error (T) ColumnTypes(dst interface{}) ([]ColumnType, error) (T) CreateConstraint(dst interface{}, name string) error (T) CreateIndex(dst interface{}, name string) error (T) CreateTable(dst ...interface{}) error (T) CreateView(name string, option ViewOption) error (T) CurrentDatabase() string (T) DropColumn(dst interface{}, field string) error (T) DropConstraint(dst interface{}, name string) error (T) DropIndex(dst interface{}, name string) error (T) DropTable(dst ...interface{}) error (T) DropView(name string) error (T) FullDataTypeOf(*schema.Field) clause.Expr (T) HasColumn(dst interface{}, field string) bool (T) HasConstraint(dst interface{}, name string) bool (T) HasIndex(dst interface{}, name string) bool (T) HasTable(dst interface{}) bool (T) MigrateColumn(dst interface{}, field *schema.Field, columnType ColumnType) error (T) RenameColumn(dst interface{}, oldName, field string) error (T) RenameIndex(dst interface{}, oldName, newName string) error (T) RenameTable(oldName, newName interface{}) error gorm.io/gorm/migrator.Migrator gorm.io/driver/mysql.Migrator func (*DB).Migrator() Migrator func Dialector.Migrator(db *DB) Migrator func gorm.io/driver/mysql.Dialector.Migrator(db *DB) Migrator
type Model (struct) 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 } CreatedAt time.Time DeletedAt DeletedAt ID uint UpdatedAt time.Time
type Plugin (interface) Plugin GORM plugin interface (T) Initialize(*DB) error (T) Name() string Config DB Dialector (interface) Statement gorm.io/gorm/migrator.Config gorm.io/gorm/migrator.Migrator gorm.io/driver/mysql.Dialector gorm.io/driver/mysql.Migrator func (*DB).Use(plugin Plugin) (err error)
type PreparedStmtDB (struct) ConnPool ConnPool Mux *sync.RWMutex PreparedSQL []string Stmts map[string]*sql.Stmt (*T) BeginTx(ctx context.Context, opt *sql.TxOptions) (ConnPool, error) (*T) Close() (*T) ExecContext(ctx context.Context, query string, args ...interface{}) (result sql.Result, err error) (T) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) (*T) QueryContext(ctx context.Context, query string, args ...interface{}) (rows *sql.Rows, err error) (*T) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row *T : ConnPool *T : ConnPoolBeginner
type PreparedStmtTX (struct) PreparedStmtDB *PreparedStmtDB Tx *sql.Tx (*T) Commit() error (T) Exec(query string, args ...interface{}) (sql.Result, error) (*T) ExecContext(ctx context.Context, query string, args ...interface{}) (result sql.Result, err error) (T) Prepare(query string) (*sql.Stmt, error) (T) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) (T) Query(query string, args ...interface{}) (*sql.Rows, error) (*T) QueryContext(ctx context.Context, query string, args ...interface{}) (rows *sql.Rows, err error) (T) QueryRow(query string, args ...interface{}) *sql.Row (*T) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row (*T) Rollback() error (T) Stmt(stmt *sql.Stmt) *sql.Stmt (T) StmtContext(ctx context.Context, stmt *sql.Stmt) *sql.Stmt *T : ConnPool *T : TxCommitter *T : database/sql/driver.Tx
type SavePointerDialectorInterface (interface) SavePointerDialectorInterface save pointer interface (T) RollbackTo(tx *DB, name string) error (T) SavePoint(tx *DB, name string) error gorm.io/driver/mysql.Dialector gorm.io/driver/mysql.Migrator
type Session (struct) Session session config when create session with Session() method AllowGlobalUpdate bool Context context.Context DryRun bool FullSaveAssociations bool Logger logger.Interface NowFunc func() time.Time PrepareStmt bool SkipDefaultTransaction bool WithConditions bool func (*DB).Session(config *Session) *DB
type SoftDeleteDeleteClause (struct) Field *schema.Field (T) Build(clause.Builder) (T) MergeClause(*clause.Clause) (T) ModifyStatement(stmt *Statement) (T) Name() string T : StatementModifier T : gorm.io/gorm/clause.Expression T : gorm.io/gorm/clause.Interface
type SoftDeleteQueryClause (struct) Field *schema.Field (T) Build(clause.Builder) (T) MergeClause(*clause.Clause) (T) ModifyStatement(stmt *Statement) (T) Name() string T : StatementModifier T : gorm.io/gorm/clause.Expression T : gorm.io/gorm/clause.Interface
type Statement (struct) Statement statement Clauses map[string]clause.Clause ConnPool ConnPool Context context.Context CurDestIndex int DB *DB DB.Config *Config DB.Config.AllowGlobalUpdate bool DB.Config.ClauseBuilders map[string]clause.ClauseBuilder DB.Config.Dialector Dialector DB.Config.DisableAutomaticPing bool DB.Config.DisableForeignKeyConstraintWhenMigrating bool DB.Config.DryRun bool DB.Config.FullSaveAssociations bool DB.Config.Logger logger.Interface DB.Config.NamingStrategy schema.Namer DB.Config.NowFunc func() time.Time DB.Config.Plugins map[string]Plugin DB.Config.PrepareStmt bool DB.Config.SkipDefaultTransaction bool DB.Error error DB.RowsAffected int64 DB.Statement *Statement Dest interface{} Distinct bool Joins []join Model interface{} Omits []string Preloads map[string][]interface{} RaiseErrorOnNotFound bool ReflectValue reflect.Value SQL strings.Builder Schema *schema.Schema Selects []string Settings sync.Map Table string TableExpr *clause.Expr Unscoped bool UpdatingColumn bool Vars []interface{} (*T) AddClause(v clause.Interface) (*T) AddClauseIfNotExists(v clause.Interface) (T) AddError(err error) error (*T) AddVar(writer clause.Writer, vars ...interface{}) (T) Assign(attrs ...interface{}) (tx *DB) (T) Association(column string) *Association (T) Attrs(attrs ...interface{}) (tx *DB) (T) AutoMigrate(dst ...interface{}) error (T) Begin(opts ...*sql.TxOptions) *DB (T) BindVarTo(writer clause.Writer, stmt *Statement, v interface{}) (*T) Build(clauses ...string) (*T) BuildCondition(query interface{}, args ...interface{}) (conds []clause.Expression) (T) Callback() *callbacks (*T) Changed(fields ...string) bool (T) Commit() *DB (T) Count(count *int64) (tx *DB) (T) Create(value interface{}) (tx *DB) (T) DataTypeOf(*schema.Field) string (T) Debug() (tx *DB) (T) DefaultValueOf(*schema.Field) clause.Expression (T) Delete(value interface{}, conds ...interface{}) (tx *DB) (T) Exec(sql string, values ...interface{}) (tx *DB) (T) Explain(sql string, vars ...interface{}) string (T) Find(dest interface{}, conds ...interface{}) (tx *DB) (T) FindInBatches(dest interface{}, batchSize int, fc func(tx *DB, batch int) error) (tx *DB) (T) First(dest interface{}, conds ...interface{}) (tx *DB) (T) FirstOrCreate(dest interface{}, conds ...interface{}) (tx *DB) (T) FirstOrInit(dest interface{}, conds ...interface{}) (tx *DB) (T) Get(key string) (interface{}, bool) (T) Group(name string) (tx *DB) (T) Having(query interface{}, args ...interface{}) (tx *DB) (T) Initialize(*DB) error (T) InstanceGet(key string) (interface{}, bool) (T) InstanceSet(key string, value interface{}) *DB (T) Last(dest interface{}, conds ...interface{}) (tx *DB) (T) Limit(limit int) (tx *DB) (T) Migrator() Migrator (T) Name() string (T) Not(query interface{}, args ...interface{}) (tx *DB) (T) Offset(offset int) (tx *DB) (T) Omit(columns ...string) (tx *DB) (T) Or(query interface{}, args ...interface{}) (tx *DB) (T) Order(value interface{}) (tx *DB) (*T) Parse(value interface{}) (err error) (T) Pluck(column string, dest interface{}) (tx *DB) (T) Preload(query string, args ...interface{}) (tx *DB) (*T) Quote(field interface{}) string (*T) QuoteTo(writer clause.Writer, field interface{}) (T) Raw(sql string, values ...interface{}) (tx *DB) (T) Rollback() *DB (T) RollbackTo(name string) *DB (T) Row() *sql.Row (T) Rows() (*sql.Rows, error) (T) Save(value interface{}) (tx *DB) (T) SavePoint(name string) *DB (T) Scan(dest interface{}) (tx *DB) (T) ScanRows(rows *sql.Rows, dest interface{}) error (T) Scopes(funcs ...func(*DB) *DB) *DB (T) Select(query interface{}, args ...interface{}) (tx *DB) (*T) SelectAndOmitColumns(requireCreate, requireUpdate bool) (map[string]bool, bool) (T) Session(config *Session) *DB (T) Set(key string, value interface{}) *DB (*T) SetColumn(name string, value interface{}) (T) SetupJoinTable(model interface{}, field string, joinTable interface{}) error (T) Take(dest interface{}, conds ...interface{}) (tx *DB) (T) Transaction(fc func(tx *DB) error, opts ...*sql.TxOptions) (err error) (T) Update(column string, value interface{}) (tx *DB) (T) UpdateColumn(column string, value interface{}) (tx *DB) (T) UpdateColumns(values interface{}) (tx *DB) (T) Updates(values interface{}) (tx *DB) (T) Use(plugin Plugin) (err error) (T) Where(query interface{}, args ...interface{}) (tx *DB) (T) WithContext(ctx context.Context) *DB (*T) WriteByte(c byte) error (*T) WriteQuoted(value interface{}) (*T) WriteString(str string) (int, error) T : Plugin *T : gorm.io/gorm/clause.Builder *T : gorm.io/gorm/clause.Writer *T : io.ByteWriter *T : io.StringWriter func Dialector.BindVarTo(writer clause.Writer, stmt *Statement, v interface{}) func SoftDeleteDeleteClause.ModifyStatement(stmt *Statement) func SoftDeleteQueryClause.ModifyStatement(stmt *Statement) func StatementModifier.ModifyStatement(*Statement) func gorm.io/gorm/callbacks.ConvertMapToValuesForCreate(stmt *Statement, mapValue map[string]interface{}) (values clause.Values) func gorm.io/gorm/callbacks.ConvertSliceOfMapToValuesForCreate(stmt *Statement, mapValues []map[string]interface{}) (values clause.Values) func gorm.io/gorm/callbacks.ConvertToAssignments(stmt *Statement) (set clause.Set) func gorm.io/gorm/callbacks.ConvertToCreateValues(stmt *Statement) (values clause.Values) func gorm.io/gorm/migrator.BuildIndexOptionsInterface.BuildIndexOptions([]schema.IndexOption, *Statement) []interface{} func gorm.io/gorm/migrator.Migrator.BuildIndexOptions(opts []schema.IndexOption, stmt *Statement) (results []interface{}) func gorm.io/gorm/migrator.Migrator.CurrentTable(stmt *Statement) interface{} func gorm.io/driver/mysql.Dialector.BindVarTo(writer clause.Writer, stmt *Statement, v interface{})
type StatementModifier (interface) StatementModifier statement modifier interface (T) ModifyStatement(*Statement) SoftDeleteDeleteClause SoftDeleteQueryClause
type TxBeginner (interface) (T) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) database/sql.(*Conn) database/sql.(*DB)
type TxCommitter (interface) (T) Commit() error (T) Rollback() error *PreparedStmtTX database/sql.(*Tx) database/sql/driver.Tx (interface) T : database/sql/driver.Tx
type Valuer (interface) Valuer gorm valuer interface (T) GormValue(context.Context, *DB) clause.Expr
type ViewOption (struct) ViewOption view option CheckOption string Query *DB Replace bool func Migrator.CreateView(name string, option ViewOption) error func gorm.io/gorm/migrator.Migrator.CreateView(name string, option ViewOption) error
Exported Values
var ErrDryRunModeUnsupported error ErrDryRunModeUnsupported dry run mode unsupported
var ErrEmptySlice error ErrEmptySlice empty slice found
var ErrInvalidData error ErrInvalidData unsupported data
var ErrInvalidField error ErrInvalidField invalid field
var ErrInvalidTransaction error ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`
var ErrMissingWhereClause error ErrMissingWhereClause missing where clause
var ErrModelValueRequired error ErrModelValueRequired model value required
var ErrNotImplemented error ErrNotImplemented not implemented
var ErrPrimaryKeyRequired error ErrPrimaryKeyRequired primary keys required
var ErrRecordNotFound error ErrRecordNotFound record not found error
var ErrRegistered error ErrRegistered registered
var ErrUnsupportedDriver error ErrUnsupportedDriver unsupported driver
var ErrUnsupportedRelation error ErrUnsupportedRelation unsupported relations
func Expr(expr string, args ...interface{}) clause.Expr
func Open(dialector Dialector, config *Config) (db *DB, err error) Open initialize db session based on dialector
func Scan(rows *sql.Rows, db *DB, initialized bool)