relation

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicTable

type BasicTable interface {
	Table
	genorm.BasicTable
}

type JoinedTable

type JoinedTable interface {
	Table
	genorm.JoinedTable
	SetRelation(*Relation)
}

type JoinedTablePointer added in v1.1.1

type JoinedTablePointer[T any] interface {
	JoinedTable
	*T
}

type Relation

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

func (*Relation) JoinedTableName

func (r *Relation) JoinedTableName() (string, []genorm.ExprType, []error)

type RelationContext

type RelationContext[S Table, T Table, _ JoinedTablePointer[V], V any] struct {
	// contains filtered or unexported fields
}

func NewRelationContext

func NewRelationContext[S Table, T Table, U JoinedTablePointer[V], V any](baseTable S, refTable T) *RelationContext[S, T, U, V]

func (*RelationContext[S, T, U, V]) Join

func (r *RelationContext[S, T, U, V]) Join(
	expr genorm.TypedTableExpr[U, genorm.WrappedPrimitive[bool]],
) U

Join INNER JOIN(CROSS JOIN)

func (*RelationContext[S, T, U, V]) LeftJoin

func (r *RelationContext[S, T, U, V]) LeftJoin(
	expr genorm.TypedTableExpr[U, genorm.WrappedPrimitive[bool]],
) U

LeftJoin LEFT JOIN

func (*RelationContext[S, T, U, V]) RightJoin

func (r *RelationContext[S, T, U, V]) RightJoin(
	expr genorm.TypedTableExpr[U, genorm.WrappedPrimitive[bool]],
) U

RightJoin RIGHT JOIN

type RelationType

type RelationType int8

type Table

type Table interface {
	genorm.Table
}

Jump to

Keyboard shortcuts

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