mixin

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 9 Imported by: 1

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 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) Indexes

func (SoftDeleteMixin) Indexes() []ent.Index

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 TimeMixin

type TimeMixin struct {
	// We embed the `mixin.Schema` to avoid
	// implementing the rest of the methods.
	mixin.Schema
}

TimeMixin implements the ent.Mixin for sharing time fields with package schemas.

func (TimeMixin) Fields

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

func (TimeMixin) Indexes

func (TimeMixin) Indexes() []ent.Index

Jump to

Keyboard shortcuts

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