metadata

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTableName

func GetTableName(obj interface{}) (string, bool)

Types

type CacheEntry

type CacheEntry struct {
	Columns      []string
	FieldIndexes []int
}

CacheEntry wird für die Metadaten verwendet (ggf. in ein gemeinsames Modell auslagern, falls von mehreren Paketen benötigt)

func ExtractTypeMeta

func ExtractTypeMeta(obj interface{}, cacheLoader func(reflect.Type) (CacheEntry, bool), cacheStorer func(reflect.Type, CacheEntry)) (reflect.Type, reflect.Value, string, CacheEntry, error)

ExtractTypeMeta extrahiert Typ-, Value-, Tabellen- und Cache-Metadaten für ein Objekt

type DataType

type DataType struct {
	Type           string
	Nullable       bool
	Default        string
	Discriminatory string
}

type DataTypeInfo

type DataTypeInfo struct {
	Columns           []string
	Types             []DataType
	DiscriminatoryCol string
	DiscriminatoryVal string
	Relations         []RelationInfo
}

func GetDataTypeInfo

func GetDataTypeInfo(obj interface{}) DataTypeInfo

type RelationInfo added in v0.1.5

type RelationInfo struct {
	Type       string // e.g. "m2m"
	FieldType  reflect.Type
	FieldName  string
	JoinEntity string
	JoinTable  string
	JoinFK     string
	JoinAssFK  string
}

Jump to

Keyboard shortcuts

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