softdelete

package module
v0.0.0-...-ada951f Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 7 Imported by: 0

README

Ent Soft Delete

This extension for Ent provides soft delete functionality without importing the generated codebase into the schema.

Planned Features

  • Generates soft delete hooks and interceptors.
  • A mixin and annotations that can be used to enable soft delete on schema.
  • Customizability over various aspects of the functionality.
    • The column name.
  • Support for cascades.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct{}

type Extension

type Extension struct {
	entc.DefaultExtension
	Config Config
}

func NewExtension

func NewExtension(config Config) (*Extension, []entgql.ExtensionOption, error)

func (*Extension) Annotations

func (e *Extension) Annotations() []entc.Annotation

func (*Extension) Hooks

func (e *Extension) Hooks() []gen.Hook

func (*Extension) Templates

func (e *Extension) Templates() []*gen.Template

type Mixin

type Mixin struct {
	mixin.Schema
}

func (Mixin) Fields

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

Fields of the SoftDeleteMixin.

Jump to

Keyboard shortcuts

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