softdelete

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PatchGormDeleteAtOnce = new(sync.Once)
)

Functions

func IsClausesWithSoftDelete

func IsClausesWithSoftDelete(clauses map[string]clause.Clause) (withSoftDelete bool)

func PatchGormDeleteAt

func PatchGormDeleteAt() (patches *gomonkey.Patches)

Types

type Deleted

type Deleted bool

func (Deleted) DeleteClauses

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

func (Deleted) MarshalJSON

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

func (Deleted) QueryClauses

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

func (*Deleted) Scan

func (s *Deleted) Scan(value any) (err error)

Scan implements the Scanner interface.

func (*Deleted) UnmarshalJSON

func (s *Deleted) UnmarshalJSON(bs []byte) error

func (Deleted) UpdateClauses

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

func (Deleted) Value

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

Value implements the driver Valuer interface.

type Timestamp

type Timestamp sql.NullInt64

func (Timestamp) DeleteClauses

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

func (Timestamp) MarshalJSON

func (t Timestamp) MarshalJSON() ([]byte, error)

func (Timestamp) QueryClauses

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

func (*Timestamp) Scan

func (t *Timestamp) Scan(value any) error

Scan implements the Scanner interface.

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(bs []byte) error

func (Timestamp) UpdateClauses

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

func (Timestamp) Value

func (t Timestamp) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type TimestampDeleteClause

type TimestampDeleteClause struct {
	ZeroValue sql.NullInt64
	Field     *schema.Field
}

func (TimestampDeleteClause) Build

func (TimestampDeleteClause) MergeClause

func (t TimestampDeleteClause) MergeClause(*clause.Clause)

func (TimestampDeleteClause) ModifyStatement

func (t TimestampDeleteClause) ModifyStatement(stmt *gorm.Statement)

func (TimestampDeleteClause) Name

func (t TimestampDeleteClause) Name() string

type TimestampQueryClause

type TimestampQueryClause struct {
	ZeroValue sql.NullInt64
	Field     *schema.Field
}

func (TimestampQueryClause) Build

func (TimestampQueryClause) MergeClause

func (t TimestampQueryClause) MergeClause(*clause.Clause)

func (TimestampQueryClause) ModifyStatement

func (t TimestampQueryClause) ModifyStatement(stmt *gorm.Statement)

func (TimestampQueryClause) Name

func (t TimestampQueryClause) Name() string

type TimestampUpdateClause

type TimestampUpdateClause struct {
	ZeroValue sql.NullInt64
	Field     *schema.Field
}

func (TimestampUpdateClause) Build

func (TimestampUpdateClause) MergeClause

func (t TimestampUpdateClause) MergeClause(*clause.Clause)

func (TimestampUpdateClause) ModifyStatement

func (t TimestampUpdateClause) ModifyStatement(stmt *gorm.Statement)

func (TimestampUpdateClause) Name

func (t TimestampUpdateClause) Name() string

Jump to

Keyboard shortcuts

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