repositories

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IActivityDo

type IActivityDo interface {
	gen.SubQuery
	Debug() IActivityDo
	WithContext(ctx context.Context) IActivityDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IActivityDo
	WriteDB() IActivityDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IActivityDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IActivityDo
	Not(conds ...gen.Condition) IActivityDo
	Or(conds ...gen.Condition) IActivityDo
	Select(conds ...field.Expr) IActivityDo
	Where(conds ...gen.Condition) IActivityDo
	Order(conds ...field.Expr) IActivityDo
	Distinct(cols ...field.Expr) IActivityDo
	Omit(cols ...field.Expr) IActivityDo
	Join(table schema.Tabler, on ...field.Expr) IActivityDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IActivityDo
	RightJoin(table schema.Tabler, on ...field.Expr) IActivityDo
	Group(cols ...field.Expr) IActivityDo
	Having(conds ...gen.Condition) IActivityDo
	Limit(limit int) IActivityDo
	Offset(offset int) IActivityDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IActivityDo
	Unscoped() IActivityDo
	Create(values ...*models.Activity) error
	CreateInBatches(values []*models.Activity, batchSize int) error
	Save(values ...*models.Activity) error
	First() (*models.Activity, error)
	Take() (*models.Activity, error)
	Last() (*models.Activity, error)
	Find() ([]*models.Activity, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*models.Activity, err error)
	FindInBatches(result *[]*models.Activity, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*models.Activity) (info gen.ResultInfo, err error)
	Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	Updates(value interface{}) (info gen.ResultInfo, err error)
	UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
	UpdateFrom(q gen.SubQuery) gen.Dao
	Attrs(attrs ...field.AssignExpr) IActivityDo
	Assign(attrs ...field.AssignExpr) IActivityDo
	Joins(fields ...field.RelationField) IActivityDo
	Preload(fields ...field.RelationField) IActivityDo
	FirstOrInit() (*models.Activity, error)
	FirstOrCreate() (*models.Activity, error)
	FindByPage(offset int, limit int) (result []*models.Activity, count int64, err error)
	ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
	Rows() (*sql.Rows, error)
	Row() *sql.Row
	Scan(result interface{}) (err error)
	Returning(value interface{}, columns ...string) IActivityDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IAttributeDo

type IAttributeDo interface {
	gen.SubQuery
	Debug() IAttributeDo
	WithContext(ctx context.Context) IAttributeDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IAttributeDo
	WriteDB() IAttributeDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IAttributeDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IAttributeDo
	Not(conds ...gen.Condition) IAttributeDo
	Or(conds ...gen.Condition) IAttributeDo
	Select(conds ...field.Expr) IAttributeDo
	Where(conds ...gen.Condition) IAttributeDo
	Order(conds ...field.Expr) IAttributeDo
	Distinct(cols ...field.Expr) IAttributeDo
	Omit(cols ...field.Expr) IAttributeDo
	Join(table schema.Tabler, on ...field.Expr) IAttributeDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IAttributeDo
	RightJoin(table schema.Tabler, on ...field.Expr) IAttributeDo
	Group(cols ...field.Expr) IAttributeDo
	Having(conds ...gen.Condition) IAttributeDo
	Limit(limit int) IAttributeDo
	Offset(offset int) IAttributeDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IAttributeDo
	Unscoped() IAttributeDo
	Create(values ...*models.Attribute) error
	CreateInBatches(values []*models.Attribute, batchSize int) error
	Save(values ...*models.Attribute) error
	First() (*models.Attribute, error)
	Take() (*models.Attribute, error)
	Last() (*models.Attribute, error)
	Find() ([]*models.Attribute, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*models.Attribute, err error)
	FindInBatches(result *[]*models.Attribute, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*models.Attribute) (info gen.ResultInfo, err error)
	Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	Updates(value interface{}) (info gen.ResultInfo, err error)
	UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
	UpdateFrom(q gen.SubQuery) gen.Dao
	Attrs(attrs ...field.AssignExpr) IAttributeDo
	Assign(attrs ...field.AssignExpr) IAttributeDo
	Joins(fields ...field.RelationField) IAttributeDo
	Preload(fields ...field.RelationField) IAttributeDo
	FirstOrInit() (*models.Attribute, error)
	FirstOrCreate() (*models.Attribute, error)
	FindByPage(offset int, limit int) (result []*models.Attribute, count int64, err error)
	ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
	Rows() (*sql.Rows, error)
	Row() *sql.Row
	Scan(result interface{}) (err error)
	Returning(value interface{}, columns ...string) IAttributeDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IHistoryEventDo

type IHistoryEventDo interface {
	gen.SubQuery
	Debug() IHistoryEventDo
	WithContext(ctx context.Context) IHistoryEventDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IHistoryEventDo
	WriteDB() IHistoryEventDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IHistoryEventDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IHistoryEventDo
	Not(conds ...gen.Condition) IHistoryEventDo
	Or(conds ...gen.Condition) IHistoryEventDo
	Select(conds ...field.Expr) IHistoryEventDo
	Where(conds ...gen.Condition) IHistoryEventDo
	Order(conds ...field.Expr) IHistoryEventDo
	Distinct(cols ...field.Expr) IHistoryEventDo
	Omit(cols ...field.Expr) IHistoryEventDo
	Join(table schema.Tabler, on ...field.Expr) IHistoryEventDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IHistoryEventDo
	RightJoin(table schema.Tabler, on ...field.Expr) IHistoryEventDo
	Group(cols ...field.Expr) IHistoryEventDo
	Having(conds ...gen.Condition) IHistoryEventDo
	Limit(limit int) IHistoryEventDo
	Offset(offset int) IHistoryEventDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IHistoryEventDo
	Unscoped() IHistoryEventDo
	Create(values ...*models.HistoryEvent) error
	CreateInBatches(values []*models.HistoryEvent, batchSize int) error
	Save(values ...*models.HistoryEvent) error
	First() (*models.HistoryEvent, error)
	Take() (*models.HistoryEvent, error)
	Last() (*models.HistoryEvent, error)
	Find() ([]*models.HistoryEvent, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*models.HistoryEvent, err error)
	FindInBatches(result *[]*models.HistoryEvent, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*models.HistoryEvent) (info gen.ResultInfo, err error)
	Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	Updates(value interface{}) (info gen.ResultInfo, err error)
	UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
	UpdateFrom(q gen.SubQuery) gen.Dao
	Attrs(attrs ...field.AssignExpr) IHistoryEventDo
	Assign(attrs ...field.AssignExpr) IHistoryEventDo
	Joins(fields ...field.RelationField) IHistoryEventDo
	Preload(fields ...field.RelationField) IHistoryEventDo
	FirstOrInit() (*models.HistoryEvent, error)
	FirstOrCreate() (*models.HistoryEvent, error)
	FindByPage(offset int, limit int) (result []*models.HistoryEvent, count int64, err error)
	ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
	Rows() (*sql.Rows, error)
	Row() *sql.Row
	Scan(result interface{}) (err error)
	Returning(value interface{}, columns ...string) IHistoryEventDo
	UnderlyingDB() *gorm.DB
	schema.Tabler

	EventsWithAttributes(instanceID string, executionID string, afterSequence int64, pending bool, now time.Time) (result []*models.EventPayload, err error)
	FutureWithAttributes() (result []*models.EventPayload, err error)
}

type IInstanceDo

type IInstanceDo interface {
	gen.SubQuery
	Debug() IInstanceDo
	WithContext(ctx context.Context) IInstanceDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IInstanceDo
	WriteDB() IInstanceDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IInstanceDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IInstanceDo
	Not(conds ...gen.Condition) IInstanceDo
	Or(conds ...gen.Condition) IInstanceDo
	Select(conds ...field.Expr) IInstanceDo
	Where(conds ...gen.Condition) IInstanceDo
	Order(conds ...field.Expr) IInstanceDo
	Distinct(cols ...field.Expr) IInstanceDo
	Omit(cols ...field.Expr) IInstanceDo
	Join(table schema.Tabler, on ...field.Expr) IInstanceDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IInstanceDo
	RightJoin(table schema.Tabler, on ...field.Expr) IInstanceDo
	Group(cols ...field.Expr) IInstanceDo
	Having(conds ...gen.Condition) IInstanceDo
	Limit(limit int) IInstanceDo
	Offset(offset int) IInstanceDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IInstanceDo
	Unscoped() IInstanceDo
	Create(values ...*models.Instance) error
	CreateInBatches(values []*models.Instance, batchSize int) error
	Save(values ...*models.Instance) error
	First() (*models.Instance, error)
	Take() (*models.Instance, error)
	Last() (*models.Instance, error)
	Find() ([]*models.Instance, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*models.Instance, err error)
	FindInBatches(result *[]*models.Instance, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*models.Instance) (info gen.ResultInfo, err error)
	Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	Updates(value interface{}) (info gen.ResultInfo, err error)
	UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
	UpdateFrom(q gen.SubQuery) gen.Dao
	Attrs(attrs ...field.AssignExpr) IInstanceDo
	Assign(attrs ...field.AssignExpr) IInstanceDo
	Joins(fields ...field.RelationField) IInstanceDo
	Preload(fields ...field.RelationField) IInstanceDo
	FirstOrInit() (*models.Instance, error)
	FirstOrCreate() (*models.Instance, error)
	FindByPage(offset int, limit int) (result []*models.Instance, count int64, err error)
	ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
	Rows() (*sql.Rows, error)
	Row() *sql.Row
	Scan(result interface{}) (err error)
	Returning(value interface{}, columns ...string) IInstanceDo
	UnderlyingDB() *gorm.DB
	schema.Tabler

	PageAfter(afterID string, afterExecution string, limit int) (result []*models.Instance, err error)
	RunnableCounts(state int, now time.Time) (result []*models.QueueCount, err error)
	NextRunnable(now time.Time, worker string, queues []string, state int) (result *models.Instance, err error)
}

type IPendingEventDo

type IPendingEventDo interface {
	gen.SubQuery
	Debug() IPendingEventDo
	WithContext(ctx context.Context) IPendingEventDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IPendingEventDo
	WriteDB() IPendingEventDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IPendingEventDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IPendingEventDo
	Not(conds ...gen.Condition) IPendingEventDo
	Or(conds ...gen.Condition) IPendingEventDo
	Select(conds ...field.Expr) IPendingEventDo
	Where(conds ...gen.Condition) IPendingEventDo
	Order(conds ...field.Expr) IPendingEventDo
	Distinct(cols ...field.Expr) IPendingEventDo
	Omit(cols ...field.Expr) IPendingEventDo
	Join(table schema.Tabler, on ...field.Expr) IPendingEventDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IPendingEventDo
	RightJoin(table schema.Tabler, on ...field.Expr) IPendingEventDo
	Group(cols ...field.Expr) IPendingEventDo
	Having(conds ...gen.Condition) IPendingEventDo
	Limit(limit int) IPendingEventDo
	Offset(offset int) IPendingEventDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IPendingEventDo
	Unscoped() IPendingEventDo
	Create(values ...*models.PendingEvent) error
	CreateInBatches(values []*models.PendingEvent, batchSize int) error
	Save(values ...*models.PendingEvent) error
	First() (*models.PendingEvent, error)
	Take() (*models.PendingEvent, error)
	Last() (*models.PendingEvent, error)
	Find() ([]*models.PendingEvent, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*models.PendingEvent, err error)
	FindInBatches(result *[]*models.PendingEvent, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*models.PendingEvent) (info gen.ResultInfo, err error)
	Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	Updates(value interface{}) (info gen.ResultInfo, err error)
	UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
	UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
	UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
	UpdateFrom(q gen.SubQuery) gen.Dao
	Attrs(attrs ...field.AssignExpr) IPendingEventDo
	Assign(attrs ...field.AssignExpr) IPendingEventDo
	Joins(fields ...field.RelationField) IPendingEventDo
	Preload(fields ...field.RelationField) IPendingEventDo
	FirstOrInit() (*models.PendingEvent, error)
	FirstOrCreate() (*models.PendingEvent, error)
	FindByPage(offset int, limit int) (result []*models.PendingEvent, count int64, err error)
	ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
	Rows() (*sql.Rows, error)
	Row() *sql.Row
	Scan(result interface{}) (err error)
	Returning(value interface{}, columns ...string) IPendingEventDo
	UnderlyingDB() *gorm.DB
	schema.Tabler

	EventsWithAttributes(instanceID string, executionID string, afterSequence int64, pending bool, now time.Time) (result []*models.EventPayload, err error)
	FutureWithAttributes() (result []*models.EventPayload, err error)
}

type Query

type Query struct {
	Activity     activity
	Attribute    attribute
	HistoryEvent historyEvent
	Instance     instance
	PendingEvent pendingEvent
	// contains filtered or unexported fields
}

func Use

func Use(db *gorm.DB, opts ...gen.DOOption) *Query

func (*Query) Available

func (q *Query) Available() bool

func (*Query) Begin

func (q *Query) Begin(opts ...*sql.TxOptions) *QueryTx

func (*Query) ReadDB

func (q *Query) ReadDB() *Query

func (*Query) ReplaceDB

func (q *Query) ReplaceDB(db *gorm.DB) *Query

func (*Query) Transaction

func (q *Query) Transaction(fc func(tx *Query) error, opts ...*sql.TxOptions) error

func (*Query) UnderlyingDB

func (q *Query) UnderlyingDB() *gorm.DB

func (*Query) WithContext

func (q *Query) WithContext(ctx context.Context) *queryCtx

func (*Query) WriteDB

func (q *Query) WriteDB() *Query

type QueryTx

type QueryTx struct {
	*Query
	Error error
}

func (*QueryTx) Commit

func (q *QueryTx) Commit() error

func (*QueryTx) Rollback

func (q *QueryTx) Rollback() error

func (*QueryTx) RollbackTo

func (q *QueryTx) RollbackTo(name string) error

func (*QueryTx) SavePoint

func (q *QueryTx) SavePoint(name string) error

Jump to

Keyboard shortcuts

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