softdelete

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Overview

Package softdelete adds the soft delete pattern to the ent schemas.

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 Mixin

type Mixin struct {
	mixin.Schema
}

Mixin implements the soft delete pattern for schemas.

func (Mixin) Fields

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

Fields of the SoftDeleteMixin.

func (Mixin) Hooks

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

Hooks of the SoftDeleteMixin.

func (Mixin) Interceptors

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

Interceptors of the SoftDeleteMixin.

func (Mixin) P

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

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

Jump to

Keyboard shortcuts

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