mixin

package
v5.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipSoftDelete

func SkipSoftDelete(parent context.Context) context.Context

SkipSoftDelete returns a new context that skips the soft-delete interceptor/mutators.

Types

type CreateAt

type CreateAt struct{ ent.Schema }

CreateAt adds created at time field.

func (CreateAt) Fields

func (CreateAt) Fields() []ent.Field

Fields of the create time mixin.

type SoftDeleteMixin

type SoftDeleteMixin struct {
	mixin.Schema
}

SoftDeleteMixin implements the soft delete pattern for schemas.

func (SoftDeleteMixin) Fields

func (SoftDeleteMixin) Fields() []ent.Field

Fields of the SoftDeleteMixin.

func (SoftDeleteMixin) Hooks

func (d SoftDeleteMixin) Hooks() []ent.Hook

Hooks of the SoftDeleteMixin.

func (SoftDeleteMixin) Interceptors

func (d SoftDeleteMixin) Interceptors() []ent.Interceptor

Interceptors of the SoftDeleteMixin.

func (SoftDeleteMixin) P

func (d SoftDeleteMixin) P(w interface{ WhereP(...func(*sql.Selector)) })

P adds a storage-level predicate to the queries and mutations.

type Time

type Time struct{ ent.Schema }

Time composes create/update time mixin.

func (Time) Fields

func (Time) Fields() []ent.Field

Fields of the time mixin.

type UpdateAt

type UpdateAt struct{ ent.Schema }

UpdateAt adds updated at time field.

func (UpdateAt) Fields

func (UpdateAt) Fields() []ent.Field

Fields of the update time mixin.

Jump to

Keyboard shortcuts

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