internal

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: GPL-2.0 Imports: 11 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 GetRelatedName

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

func NewDefiner

func NewDefiner[T attrs.Definer]() T

func NewObjectFromIface

func NewObjectFromIface(obj attrs.Definer) attrs.Definer

func RegisterDriver

func RegisterDriver(driver driver.Driver, database string, supportsReturning ...SupportsReturning)

func SqlxDriverName

func SqlxDriverName(db *sql.DB) 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 QueryInfo

type QueryInfo struct {
	DB          *sql.DB
	DBX         interface{ Rebind(string) string }
	SqlxDriver  string
	TableName   string
	Definitions attrs.Definitions
	Primary     attrs.Field
	Fields      []attrs.Field
}

func GetBaseQueryInfo

func GetBaseQueryInfo(obj attrs.Definer) (*QueryInfo, error)

func GetQueryInfo

func GetQueryInfo(obj attrs.Definer, dbKey string) (*QueryInfo, error)

type SupportsReturning

type SupportsReturning string
const (
	SupportsReturningNone         SupportsReturning = ""
	SupportsReturningLastInsertId SupportsReturning = "last_insert_id"
	SupportsReturningColumns      SupportsReturning = "columns"
)

func DBSupportsReturning

func DBSupportsReturning(db *sql.DB) SupportsReturning

Jump to

Keyboard shortcuts

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