internal

package
v0.0.0-...-7301b28 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CACHE_TRAVERSAL_RESULTS = false
)

Variables

This section is empty.

Functions

func DefinerListToList

func DefinerListToList[T attrs.Definer](list []attrs.Definer) []T

func DriverValue

func DriverValue(arg any) (driver.Value, error)

driverValue prepares the value for the driver to be used in a query. it makes sure that the value adheres to the driver.Value interface.

func GetFromAttrs

func GetFromAttrs[T any](attrMap map[string]any, key string) (T, bool)

func GetRelatedName

func GetRelatedName(f attrs.Field, default_ string) string

func ListUnpack

func ListUnpack(list ...any) []any

func NewDefiner

func NewDefiner[T attrs.Definer]() T

func NewObjectFromIface

func NewObjectFromIface(obj attrs.Definer) attrs.Definer

func SqlxDriverName

func SqlxDriverName(db drivers.Database) string

func WalkFields

func WalkFields(
	m attrs.Definer,
	column string,
	aliasGen *alias.Generator,
) (
	definer attrs.Definer,
	parent attrs.Definer,
	f attrs.Field,
	chain []string,
	aliases []string,
	isRelated bool,
	err error,
)

Types

type BaseSet

type BaseSet[E comparable] map[E]struct{}

func NewSet

func NewSet[E comparable](s ...E) BaseSet[E]

func (BaseSet[E]) Add

func (s BaseSet[E]) Add(e ...E)

func (BaseSet[E]) Clear

func (s BaseSet[E]) Clear()

func (BaseSet[E]) Contains

func (s BaseSet[E]) Contains(e E) bool

func (BaseSet[E]) Len

func (s BaseSet[E]) Len() int

func (BaseSet[E]) Remove

func (s BaseSet[E]) Remove(e E)

func (BaseSet[E]) Values

func (s BaseSet[E]) Values() []E

type OrderedSet

type OrderedSet[E comparable] struct {
	// contains filtered or unexported fields
}

func NewOrderedSet

func NewOrderedSet[E comparable](elements ...E) *OrderedSet[E]

func (*OrderedSet[E]) Add

func (s *OrderedSet[E]) Add(e ...E)

func (*OrderedSet[E]) Clear

func (s *OrderedSet[E]) Clear()

func (*OrderedSet[E]) Contains

func (s *OrderedSet[E]) Contains(e E) bool

func (*OrderedSet[E]) Len

func (s *OrderedSet[E]) Len() int

func (*OrderedSet[E]) Remove

func (s *OrderedSet[E]) Remove(e E)

func (*OrderedSet[E]) Values

func (s *OrderedSet[E]) Values() []E

type QueryInfo

type QueryInfo struct {
	DatabaseName string // The name of the database connection
	DB           drivers.Database
	DBX          func(string) string
	SqlxDriver   string
}

func GetQueryInfo

func GetQueryInfo(dbKey string) (*QueryInfo, error)

type Set

type Set[E comparable] interface {
	Contains(e E) bool
	Add(e ...E)
	Remove(e E)
	Clear()
	Values() []E
	Len() int
}

Jump to

Keyboard shortcuts

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