core

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModelHasSoftDelete

func ModelHasSoftDelete(t reflect.Type) bool

ModelHasSoftDelete checks if a struct has a db:"deleted_at" field

func ParseDBTag

func ParseDBTag(tag string) string

func SetFieldByIndex

func SetFieldByIndex(v reflect.Value, index []int, value any)

func ToSnakeCase

func ToSnakeCase(s string) string

Types

type StructFieldInfo

type StructFieldInfo struct {
	Index []int
	Name  string
}

type StructMapping

type StructMapping struct {
	FieldsByColumn map[string]StructFieldInfo
	PrimaryColumn  string
	AutoIncrement  bool
	VersionColumn  string
}

func StructMapper

func StructMapper(t reflect.Type) StructMapping

Jump to

Keyboard shortcuts

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