plugins

package
v0.19.1245 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallObjMethod

func CallObjMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool)

This CallObjMethod function, is copied from https://raw.githubusercontent.com/go-gorm/gorm/master/callbacks/callmethod.go, which is how the gorm hooks dispatch calls to model functions.

func TableName

func TableName(db *gorm.DB, obj any) string

func TableNameOf added in v0.19.1197

func TableNameOf[T any, PT interface {
	*T
	Tabler
}]() string

TableNameOf returns a model's table name from its Tabler implementation, for callers without a db handle such as temporal workflow code. Usage: TableNameOf[app.Install]().

Types

type Tabler

type Tabler interface {
	TableName() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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