Documentation
¶
Overview ¶
Package relationship 用于处理多对多的数据表关系
Index ¶
- type Module
- func (m *Module[T1, T2]) Add(tx *orm.Tx, v1 T1, v2 T2) error
- func (m *Module[T1, T2]) CountByV1(v1 T1) (int64, error)
- func (m *Module[T1, T2]) CountByV2(v2 T2) (int64, error)
- func (m *Module[T1, T2]) Delete(tx *orm.Tx, v1 T1, v2 T2) error
- func (m *Module[T1, T2]) DeleteByV1(tx *orm.Tx, v1 T1) error
- func (m *Module[T1, T2]) DeleteByV2(tx *orm.Tx, v2 T2) error
- func (m *Module[T1, T2]) LeftJoin(sql *sqlbuilder.SelectStmt, alias, on string)
- func (m *Module[T1, T2]) ListV1(v2 T2) ([]T1, error)
- func (m *Module[T1, T2]) ListV2(v1 T1) ([]T2, error)
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module[T1, T2 T] struct { // contains filtered or unexported fields }
func (*Module[T1, T2]) LeftJoin ¶
func (m *Module[T1, T2]) LeftJoin(sql *sqlbuilder.SelectStmt, alias, on string)
LeftJoin LEFT JOIN 至 sql
alias 为当前的 relationshipPO 表指定别名,该别名可能在 on 参数中可能会用到;
Click to show internal directories.
Click to hide internal directories.