Documentation ¶
Index ¶
- func BindSimple[LI any, RI any](binder *binding.Binder, simple *Simple[LI, RI], opts ...Option)
- func Query[TI any](fromTableName string, fromRelationFieldName string, toTableName string) binding.ServiceFunc[TI]
- func QueryWithOtherInfo[FI any, TI any](fromTableName string, fromRelationColumnName string, ...) binding.ServiceFunc[response.InfosData[map[string]any]]
- func Update(fromTableName string, fromRelationFieldName string, ...) binding.ServiceFunc[any]
- type ConditionFieldCallback
- type Option
- func WithDisableLeft() Option
- func WithDisableLeftQuery() Option
- func WithDisableLeftUpdate() Option
- func WithDisableLeftWithRightQuery() Option
- func WithDisableRight() Option
- func WithDisableRightQuery() Option
- func WithDisableRightUpdate() Option
- func WithDisableRightWithLeftQuery() Option
- func WithGlobalMiddlewares(middlewares ...binding.Middleware) Option
- func WithLeftQueryMiddlewares(middlewares ...binding.Middleware) Option
- func WithLeftQueryWithConditionFieldCallback(callbacks ConditionFieldCallback) Option
- func WithLeftUpdateMiddlewares(middlewares ...binding.Middleware) Option
- func WithLeftWithRightQueryMiddlewares(middlewares ...binding.Middleware) Option
- func WithRightQueryMiddlewares(middlewares ...binding.Middleware) Option
- func WithRightQueryWithConditionFieldCallback(callbacks ConditionFieldCallback) Option
- func WithRightUpdateMiddlewares(middlewares ...binding.Middleware) Option
- func WithRightWithLeftQueryMiddlewares(middlewares ...binding.Middleware) Option
- type Options
- type Simple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindSimple ¶
func QueryWithOtherInfo ¶
Types ¶
type ConditionFieldCallback ¶
type Option ¶
type Option func(options *Options)
func WithDisableLeft ¶
func WithDisableLeft() Option
func WithDisableLeftQuery ¶
func WithDisableLeftQuery() Option
func WithDisableLeftUpdate ¶
func WithDisableLeftUpdate() Option
func WithDisableLeftWithRightQuery ¶
func WithDisableLeftWithRightQuery() Option
func WithDisableRight ¶
func WithDisableRight() Option
func WithDisableRightQuery ¶
func WithDisableRightQuery() Option
func WithDisableRightUpdate ¶
func WithDisableRightUpdate() Option
func WithDisableRightWithLeftQuery ¶
func WithDisableRightWithLeftQuery() Option
func WithGlobalMiddlewares ¶ added in v0.8.0
func WithGlobalMiddlewares(middlewares ...binding.Middleware) Option
func WithLeftQueryMiddlewares ¶ added in v0.8.0
func WithLeftQueryMiddlewares(middlewares ...binding.Middleware) Option
func WithLeftQueryWithConditionFieldCallback ¶
func WithLeftQueryWithConditionFieldCallback(callbacks ConditionFieldCallback) Option
func WithLeftUpdateMiddlewares ¶ added in v0.8.0
func WithLeftUpdateMiddlewares(middlewares ...binding.Middleware) Option
func WithLeftWithRightQueryMiddlewares ¶ added in v0.8.0
func WithLeftWithRightQueryMiddlewares(middlewares ...binding.Middleware) Option
func WithRightQueryMiddlewares ¶ added in v0.8.0
func WithRightQueryMiddlewares(middlewares ...binding.Middleware) Option
func WithRightQueryWithConditionFieldCallback ¶
func WithRightQueryWithConditionFieldCallback(callbacks ConditionFieldCallback) Option
func WithRightUpdateMiddlewares ¶ added in v0.8.0
func WithRightUpdateMiddlewares(middlewares ...binding.Middleware) Option
func WithRightWithLeftQueryMiddlewares ¶ added in v0.8.0
func WithRightWithLeftQueryMiddlewares(middlewares ...binding.Middleware) Option
type Simple ¶
type Simple[LI any, RI any] struct { // 左领域实体,注意是Entity类型 Left entity.Entity // 右领域实体,注意是Entity类型 Right entity.Entity // 数据库Schema Schema string // 更新左实体关联使用的请求参数 LeftUpdateJsonBody request.IDRequestParam // 查询左实体关联使用的请求参数,注意是WithID类型 LeftQueryQueryParams request.IDRequestParam // 查询左实体带右实体信息使用的请求参数,注意是Query类型 LeftQueryWithRightQueryParams request.QueryRequestParams // 更新右实体关联使用的请求参数,注意是WithID类型 RightUpdateJsonBody request.IDRequestParam // 查询右实体关联使用的请求参数,注意是WithID类型 RightQueryQueryParams request.IDRequestParam // 查询右实体带左实体信息使用的请求参数,注意是WithID类型 RightQueryWithLeftQueryParams request.QueryRequestParams // contains filtered or unexported fields }
Simple 关联的Bind参数 LI 为左边实体的Info类型 RI 为右边实体的Info类型
Click to show internal directories.
Click to hide internal directories.