database

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(env *config.Config) (*gorm.DB, error)

func ParseRDBUpdateData

func ParseRDBUpdateData(x interface{}, skipFields ...string) map[string]interface{}

ParseRDBUpdateData is the same as ParseMDBUpdateData, but it will use the struct field name with the first letter lower case, avoid use field names like nationalIDNo, it will be parsed as incorrect national_idno. if the input struct has a gorm embedded field, gorm tag embedded should be set, e.g. `gorm:"embedded"` this way the function knows that the field is an embedded struct and unpack it to the result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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