orm

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CtxLoadPrefix      ctxKey = "load_parent_alias"
	CtxLoadParentAlias ctxKey = "load_prefix"
)

Functions

This section is empty.

Types

type Columns

type Columns struct {
	// contains filtered or unexported fields
}

func NewColumns

func NewColumns(names []string) Columns

func (Columns) Except

func (c Columns) Except(cols ...string) Columns

func (Columns) Only

func (c Columns) Only(cols ...string) Columns

func (Columns) WithAggFunc

func (c Columns) WithAggFunc(a, b string) Columns

func (Columns) WithParent

func (c Columns) WithParent(p ...string) Columns

func (Columns) WithPrefix

func (c Columns) WithPrefix(prefix string) Columns

func (Columns) WriteSQL

func (c Columns) WriteSQL(w io.Writer, d bob.Dialect, start int) ([]any, error)

type ExtraLoader

type ExtraLoader struct {
	Fs        []bob.LoadFunc
	OneType   reflect.Type
	SliceType reflect.Type
	// contains filtered or unexported fields
}

func (*ExtraLoader) AppendLoader

func (a *ExtraLoader) AppendLoader(fs ...bob.LoadFunc)

func (*ExtraLoader) Collect

func (a *ExtraLoader) Collect(v any) error

func (*ExtraLoader) LoadMany

func (a *ExtraLoader) LoadMany(ctx context.Context, exec scan.Queryer) error

func (*ExtraLoader) LoadOne

func (a *ExtraLoader) LoadOne(ctx context.Context, exec scan.Queryer) error

type RelSide added in v0.2.1

type RelSide struct {
	From  string
	To    string
	Pairs map[string]string
}

type Relationship

type Relationship struct {
	Name  string
	Sides []RelSide
}

Jump to

Keyboard shortcuts

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