dbutil

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 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 CheckNil

func CheckNil(v any) bool

func FromDBMap

func FromDBMap(v DBMappable, m map[string]interface{})

func GetMappable

func GetMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) PT

func QuickJson

func QuickJson(v any) string

func QuickJsonArr

func QuickJsonArr(v any) string

func QuickSetBool

func QuickSetBool(bval *bool, m map[string]any, name string)

func QuickSetBytes

func QuickSetBytes(bval *[]byte, m map[string]any, name string)

func QuickSetInt

func QuickSetInt(ival *int, m map[string]any, name string)

func QuickSetInt64

func QuickSetInt64(ival *int64, m map[string]any, name string)

func QuickSetJson

func QuickSetJson(ptr any, m map[string]any, name string)

func QuickSetJsonArr

func QuickSetJsonArr(ptr any, m map[string]any, name string)

func QuickSetStr

func QuickSetStr(strVal *string, m map[string]any, name string)

func SelectMappable

func SelectMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT

Types

type DBMappable

type DBMappable interface {
	UseDBMap()
}

type DBMappablePtr

type DBMappablePtr[T any] interface {
	DBMappable
	*T
}

Jump to

Keyboard shortcuts

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