entgo

package
v1.1.41 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyNilFieldMask added in v1.1.40

func ApplyNilFieldMask[T interface {
	Modify(...func(*sql.UpdateBuilder)) T
}](
	msg proto.Message,
	updateMask *fieldmaskpb.FieldMask,
	builder T,
)

ApplyNilFieldMask 应用字段掩码以设置字段为NULL

func BuildSetNullUpdate

func BuildSetNullUpdate(u *sql.UpdateBuilder, fields []string)

func BuildSetNullUpdater

func BuildSetNullUpdater(fields []string) func(u *sql.UpdateBuilder)

BuildSetNullUpdater 构建一个UpdateBuilder,用于清空字段的值

func ExtractJsonFieldKeyValues added in v1.1.17

func ExtractJsonFieldKeyValues(msg proto.Message, paths []string, needToSnakeCase bool) []string

ExtractJsonFieldKeyValues 提取json字段的键值对

func SetJsonFieldValueUpdateBuilder added in v1.1.17

func SetJsonFieldValueUpdateBuilder(fieldName string, msg proto.Message, paths []string, needToSnakeCase bool) func(u *sql.UpdateBuilder)

SetJsonFieldValueUpdateBuilder 设置json字段的值

func SetJsonNullFieldUpdateBuilder added in v1.1.17

func SetJsonNullFieldUpdateBuilder(fieldName string, msg proto.Message, paths []string) func(u *sql.UpdateBuilder)

SetJsonNullFieldUpdateBuilder 设置json字段的空值

Types

This section is empty.

Jump to

Keyboard shortcuts

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