db

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(gormDB *gorm.DB) (*sql.DB, error)

func NewGormDB

func NewGormDB(o *Options) (*gorm.DB, error)

Types

type Deleted added in v0.3.0

type Deleted sql.NullBool

func (Deleted) DeleteClauses added in v0.3.0

func (Deleted) DeleteClauses(f *schema.Field) []clause.Interface

func (Deleted) MarshalJSON added in v0.3.0

func (n Deleted) MarshalJSON() ([]byte, error)

func (Deleted) QueryClauses added in v0.3.0

func (Deleted) QueryClauses(f *schema.Field) []clause.Interface

func (*Deleted) Scan added in v0.3.0

func (n *Deleted) Scan(value interface{}) error

func (*Deleted) UnmarshalJSON added in v0.3.0

func (n *Deleted) UnmarshalJSON(b []byte) error

func (Deleted) UpdateClauses added in v0.3.0

func (Deleted) UpdateClauses(f *schema.Field) []clause.Interface

func (Deleted) Value added in v0.3.0

func (n Deleted) Value() (driver.Value, error)

type OptimisticLockUpdateClause added in v0.3.0

type OptimisticLockUpdateClause struct {
	Field *schema.Field
}

func (OptimisticLockUpdateClause) Build added in v0.3.0

func (OptimisticLockUpdateClause) MergeClause added in v0.3.0

func (sd OptimisticLockUpdateClause) MergeClause(*clause.Clause)

func (OptimisticLockUpdateClause) ModifyStatement added in v0.3.0

func (sd OptimisticLockUpdateClause) ModifyStatement(stmt *gorm.Statement)

func (OptimisticLockUpdateClause) Name added in v0.3.0

type Options

type Options struct {
	Type     string
	Host     string
	Port     uint16
	Username string
	Password string
	Database string
	ChartSet string
}

func NewOptions

func NewOptions(v *viper.Viper) (*Options, error)

type SoftDeleteDeleteClause added in v0.3.0

type SoftDeleteDeleteClause struct {
	Field *schema.Field
}

func (SoftDeleteDeleteClause) Build added in v0.3.0

func (SoftDeleteDeleteClause) MergeClause added in v0.3.0

func (sd SoftDeleteDeleteClause) MergeClause(*clause.Clause)

func (SoftDeleteDeleteClause) ModifyStatement added in v0.3.0

func (sd SoftDeleteDeleteClause) ModifyStatement(stmt *gorm.Statement)

func (SoftDeleteDeleteClause) Name added in v0.3.0

func (sd SoftDeleteDeleteClause) Name() string

type SoftDeleteQueryClause added in v0.3.0

type SoftDeleteQueryClause struct {
	Field *schema.Field
}

func (SoftDeleteQueryClause) Build added in v0.3.0

func (SoftDeleteQueryClause) MergeClause added in v0.3.0

func (sd SoftDeleteQueryClause) MergeClause(*clause.Clause)

func (SoftDeleteQueryClause) ModifyStatement added in v0.3.0

func (sd SoftDeleteQueryClause) ModifyStatement(stmt *gorm.Statement)

func (SoftDeleteQueryClause) Name added in v0.3.0

func (sd SoftDeleteQueryClause) Name() string

type SoftDeleteUpdateClause added in v0.3.0

type SoftDeleteUpdateClause struct {
	Field *schema.Field
}

func (SoftDeleteUpdateClause) Build added in v0.3.0

func (SoftDeleteUpdateClause) MergeClause added in v0.3.0

func (sd SoftDeleteUpdateClause) MergeClause(*clause.Clause)

func (SoftDeleteUpdateClause) ModifyStatement added in v0.3.0

func (sd SoftDeleteUpdateClause) ModifyStatement(stmt *gorm.Statement)

func (SoftDeleteUpdateClause) Name added in v0.3.0

func (sd SoftDeleteUpdateClause) Name() string

type Version added in v0.3.0

type Version sql.NullInt64

func (Version) MarshalJSON added in v0.3.0

func (n Version) MarshalJSON() ([]byte, error)

func (*Version) Scan added in v0.3.0

func (n *Version) Scan(value interface{}) error

func (*Version) UnmarshalJSON added in v0.3.0

func (n *Version) UnmarshalJSON(b []byte) error

func (Version) UpdateClauses added in v0.3.0

func (Version) UpdateClauses(f *schema.Field) []clause.Interface

func (Version) Value added in v0.3.0

func (n Version) Value() (driver.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL