DeletedAt

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultValue

func GetDefaultValue(field *schema.Field) (result any)

func TimeToUnix

func TimeToUnix(timeValue time.Time, timeType TimeType) int64

Types

type DeleteClause

type DeleteClause struct {
	Field    *schema.Field
	TimeType TimeType
}

func (*DeleteClause) Build

func (it *DeleteClause) Build(data clause.Builder)

func (*DeleteClause) MergeClause

func (it *DeleteClause) MergeClause(data *clause.Clause)

func (*DeleteClause) ModifyStatement

func (it *DeleteClause) ModifyStatement(data *gorm.Statement)

func (*DeleteClause) Name

func (it *DeleteClause) Name() string

type DeletedAt

type DeletedAt int64

func (*DeletedAt) DeleteClauses

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

func (*DeletedAt) QueryClauses

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

func (*DeletedAt) UpdateClauses

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

type QueryClause

type QueryClause struct{ Field *schema.Field }

func (*QueryClause) Build

func (it *QueryClause) Build(data clause.Builder)

func (*QueryClause) MergeClause

func (it *QueryClause) MergeClause(data *clause.Clause)

func (*QueryClause) ModifyStatement

func (it *QueryClause) ModifyStatement(data *gorm.Statement)

func (*QueryClause) Name

func (it *QueryClause) Name() string

type TimeType

type TimeType int64
const (
	Unix      TimeType = 0
	UnixMilli TimeType = 3
	UnixMicro TimeType = 6
	UnixNano  TimeType = 9
)

func GetTimeType

func GetTimeType(settings map[string]string) TimeType

type UpdateClause

type UpdateClause struct{ Field *schema.Field }

func (*UpdateClause) Build

func (it *UpdateClause) Build(data clause.Builder)

func (*UpdateClause) MergeClause

func (it *UpdateClause) MergeClause(data *clause.Clause)

func (*UpdateClause) ModifyStatement

func (it *UpdateClause) ModifyStatement(data *gorm.Statement)

func (*UpdateClause) Name

func (it *UpdateClause) Name() string

Jump to

Keyboard shortcuts

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