Documentation ¶
Index ¶
- func ExtractPreloader[PL any, Q any](queryMods ...bob.Mod[Q]) ([]bob.Mod[Q], []PL)
- func FilterNonZero[T comparable](s []T) []T
- func FirstNonEmpty[T comparable, Ts ~[]T](slice Ts) T
- func GetColumnValues[T any](mapping Mapping, filter []string, objs ...T) ([]string, [][]bob.Expression, error)
- func ToAnySlice[T any, Ts ~[]T](slice Ts) []any
- type AfterPreloader
- type Mapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPreloader ¶ added in v0.18.2
func FilterNonZero ¶ added in v0.15.0
func FilterNonZero[T comparable](s []T) []T
func FirstNonEmpty ¶ added in v0.15.0
func FirstNonEmpty[T comparable, Ts ~[]T](slice Ts) T
func GetColumnValues ¶ added in v0.3.1
func GetColumnValues[T any](mapping Mapping, filter []string, objs ...T) ([]string, [][]bob.Expression, error)
Get the values for non generated columns
func ToAnySlice ¶ added in v0.15.0
Types ¶
type AfterPreloader ¶ added in v0.13.0
type AfterPreloader struct {
// contains filtered or unexported fields
}
AfterPreloader is embedded in a Preloader to chain loading whenever a preloaded object is scanned, it should be collected with the Collect method The loading functions should be added with AppendLoader later, when this object is called like any other bob.Loader, it calls the appended loaders with the collected objects
func NewAfterPreloader ¶ added in v0.13.0
func NewAfterPreloader[T any, Ts ~[]T]() *AfterPreloader
NewAfterPreloader returns a new AfterPreloader based on the given types
func (*AfterPreloader) AppendLoader ¶ added in v0.13.0
func (a *AfterPreloader) AppendLoader(fs ...bob.Loader)
func (*AfterPreloader) Collect ¶ added in v0.13.0
func (a *AfterPreloader) Collect(v any) error
Click to show internal directories.
Click to hide internal directories.