mixin

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package mixin contains the mixin package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

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

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

func (SoftDeleteMixin) SoftDeleteHook

func (d SoftDeleteMixin) SoftDeleteHook(next ent.Mutator) ent.Mutator

SoftDeleteHook will soft delete records, by changing the delete mutation to an update and setting the deleted_at and deleted_by fields, unless the softDeleteSkipKey is set

type UnexpectedMutationTypeError

type UnexpectedMutationTypeError struct {
	MutationType ent.Mutation
}

UnexpectedMutationTypeError is returned when an unexpected mutation type is parsed

func (*UnexpectedMutationTypeError) Error

Error returns the UnexpectedAuditError in string format

Jump to

Keyboard shortcuts

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