fields

package
v1.0.6-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeletedAt

type DeletedAt sql.NullTime

DeletedAt on delete: the field value will be set to the current datetime. on query: the record will be not returned if it is soft-deleted. if you want to find the record which is soft-deleted, or you want to delete the record forever, you can use db.Unscoped().Find(&users), and db.Unscoped().Delete(&order).

func (DeletedAt) CreateClauses

func (DeletedAt) CreateClauses(f *schema.Field) []clause.Interface

CreateClauses .

func (DeletedAt) DeleteClauses

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

DeleteClauses .

func (DeletedAt) MarshalJSON

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

MarshalJSON .

func (DeletedAt) MustValue

func (n DeletedAt) MustValue() time.Time

MustValue returns zero timestamp if the value is null; returns time value if the value is not null. if the value is null returns

func (DeletedAt) QueryClauses

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

QueryClauses .

func (*DeletedAt) Scan

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

Scan implements the Scanner interface.

func (*DeletedAt) UnmarshalJSON

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

UnmarshalJSON .

func (DeletedAt) UpdateClauses

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

UpdateClauses .

func (DeletedAt) Value

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

Value implements the driver Valuer interface.

type SoftDeleteCreateClause

type SoftDeleteCreateClause struct {
	Field *schema.Field
}

SoftDeleteCreateClause .

func (SoftDeleteCreateClause) Build

Build .

func (SoftDeleteCreateClause) MergeClause

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

MergeClause .

func (SoftDeleteCreateClause) ModifyStatement

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

ModifyStatement .

func (SoftDeleteCreateClause) Name

func (sd SoftDeleteCreateClause) Name() string

Name .

type SoftDeleteDeleteClause

type SoftDeleteDeleteClause struct {
	Field *schema.Field
}

SoftDeleteDeleteClause .

func (SoftDeleteDeleteClause) Build

Build .

func (SoftDeleteDeleteClause) MergeClause

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

MergeClause .

func (SoftDeleteDeleteClause) ModifyStatement

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

ModifyStatement .

func (SoftDeleteDeleteClause) Name

func (sd SoftDeleteDeleteClause) Name() string

Name .

type SoftDeleteQueryClause

type SoftDeleteQueryClause struct {
	Field *schema.Field
}

SoftDeleteQueryClause .

func (SoftDeleteQueryClause) Build

Build .

func (SoftDeleteQueryClause) MergeClause

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

MergeClause .

func (SoftDeleteQueryClause) ModifyStatement

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

ModifyStatement .

func (SoftDeleteQueryClause) Name

func (sd SoftDeleteQueryClause) Name() string

Name .

type SoftDeleteUpdateClause

type SoftDeleteUpdateClause struct {
	Field *schema.Field
}

SoftDeleteUpdateClause .

func (SoftDeleteUpdateClause) Build

Build .

func (SoftDeleteUpdateClause) MergeClause

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

MergeClause .

func (SoftDeleteUpdateClause) ModifyStatement

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

ModifyStatement .

func (SoftDeleteUpdateClause) Name

func (sd SoftDeleteUpdateClause) Name() string

Name .

type UUID

type UUID sql.NullString

UUID auto generate an uuid on creating record.

func (UUID) CreateClauses

func (UUID) CreateClauses(f *schema.Field) []clause.Interface

CreateClauses .

func (UUID) MustValue

func (u UUID) MustValue() string

MustValue returns u.String

func (*UUID) Scan

func (u *UUID) Scan(value interface{}) error

Scan .

func (UUID) Value

func (u UUID) Value() (driver.Value, error)

Value .

type UUIDCreateClause

type UUIDCreateClause struct {
	Field *schema.Field
}

UUIDCreateClause .

func (UUIDCreateClause) Build

func (cc UUIDCreateClause) Build(clause.Builder)

Build .

func (UUIDCreateClause) MergeClause

func (cc UUIDCreateClause) MergeClause(*clause.Clause)

MergeClause .

func (UUIDCreateClause) ModifyStatement

func (cc UUIDCreateClause) ModifyStatement(stmt *gorm.Statement)

ModifyStatement .

func (UUIDCreateClause) Name

func (cc UUIDCreateClause) Name() string

Name .

Jump to

Keyboard shortcuts

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