Documentation
ΒΆ
Index ΒΆ
- func AsTypedEntities[T Entity](in []Entity) []T
- func CombinePredicates[T ~func(*sql.Selector)](preds ...T) T
- func NormalizeAggregateValue(v any) any
- func ToInterceptor[T Entity](handlers ...EntityHandler) ent.Interceptor
- type BaseBridge
- func (b *BaseBridge) Child() Node
- func (b *BaseBridge) Inverse() Bridge
- func (b *BaseBridge) Join(s *sql.Selector, outer ...*sql.SelectTable) (tables []*sql.SelectTable)
- func (b *BaseBridge) JoinPivot(s *sql.Selector, outer ...*sql.SelectTable) *sql.SelectTable
- func (b *BaseBridge) Parent() Node
- func (b *BaseBridge) RelInfos() *RelationInfos
- func (b *BaseBridge) SetInverse(bridge Bridge)
- type BaseNode
- type Bridge
- type Client
- type Entity
- type EntityClient
- type EntityHandler
- type EntityMeta
- type Field
- type Graph
- type Node
- type Query
- type RelationInfos
- type Transaction
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func AsTypedEntities ΒΆ
Transforms a slice of Entity into a slice of T (where T implements Entity) β οΈ This conversion often requires a safe type assertion or verification
func CombinePredicates ΒΆ
func ToInterceptor ΒΆ
func ToInterceptor[T Entity](handlers ...EntityHandler) ent.Interceptor
Types ΒΆ
type BaseBridge ΒΆ
type BaseBridge struct {
RelationInfos
// contains filtered or unexported fields
}
func NewBaseBridge ΒΆ
func NewBaseBridge( parent Node, child Node, inverse Bridge, relInfos RelationInfos, ) BaseBridge
func (*BaseBridge) Child ΒΆ
func (b *BaseBridge) Child() Node
func (*BaseBridge) Inverse ΒΆ
func (b *BaseBridge) Inverse() Bridge
func (*BaseBridge) Join ΒΆ
func (b *BaseBridge) Join(s *sql.Selector, outer ...*sql.SelectTable) (tables []*sql.SelectTable)
func (*BaseBridge) JoinPivot ΒΆ
func (b *BaseBridge) JoinPivot(s *sql.Selector, outer ...*sql.SelectTable) *sql.SelectTable
func (*BaseBridge) Parent ΒΆ
func (b *BaseBridge) Parent() Node
func (*BaseBridge) RelInfos ΒΆ
func (b *BaseBridge) RelInfos() *RelationInfos
func (*BaseBridge) SetInverse ΒΆ
func (b *BaseBridge) SetInverse(bridge Bridge)
type BaseNode ΒΆ
type BaseNode struct {
// contains filtered or unexported fields
}
func NewBaseNode ΒΆ
func (*BaseNode) FieldByName ΒΆ
type Bridge ΒΆ
type Bridge interface {
RelInfos() *RelationInfos
JoinPivot(*sql.Selector, ...*sql.SelectTable) *sql.SelectTable
Join(*sql.Selector, ...*sql.SelectTable) []*sql.SelectTable
Include(parentQuery Query, childQuery func(Query), handlers ...EntityHandler) Query
FilterWith(...func(*sql.Selector)) func(*sql.Selector)
Filter() func(*sql.Selector)
Inverse() Bridge
Child() Node
Parent() Node
}
type Entity ΒΆ
type Entity interface {
Metadatas() *EntityMeta
// native ent method to retrieve additionnal query values
Value(name string) (ent.Value, error)
}
func AsEntities ΒΆ
TODO: create slice pool to avoid re allocation ?
type EntityClient ΒΆ
type EntityClient interface {
Query() Query
}
type EntityHandler ΒΆ
func AddAggregatesFromValues ΒΆ
func AddAggregatesFromValues(fields ...string) EntityHandler
type EntityMeta ΒΆ
type RelationInfos ΒΆ
type Transaction ΒΆ
Click to show internal directories.
Click to hide internal directories.