Documentation
¶
Index ¶
- Variables
- func SetDefault(db *gorm.DB, opts ...gen.DOOption)
- type IAttachmentDo
- type Query
- func (q *Query) Available() bool
- func (q *Query) Begin(opts ...*sql.TxOptions) *QueryTx
- func (q *Query) ReadDB() *Query
- func (q *Query) ReplaceDB(db *gorm.DB) *Query
- func (q *Query) Transaction(fc func(tx *Query) error, opts ...*sql.TxOptions) error
- func (q *Query) WithContext(ctx context.Context) *queryCtx
- func (q *Query) WriteDB() *Query
- type QueryTx
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Q = new(Query) Attachment *attachment )
Functions ¶
Types ¶
type IAttachmentDo ¶
type IAttachmentDo interface { gen.SubQuery Debug() IAttachmentDo WithContext(ctx context.Context) IAttachmentDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAttachmentDo WriteDB() IAttachmentDo As(alias string) gen.Dao Session(config *gorm.Session) IAttachmentDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAttachmentDo Not(conds ...gen.Condition) IAttachmentDo Or(conds ...gen.Condition) IAttachmentDo Select(conds ...field.Expr) IAttachmentDo Where(conds ...gen.Condition) IAttachmentDo Order(conds ...field.Expr) IAttachmentDo Distinct(cols ...field.Expr) IAttachmentDo Omit(cols ...field.Expr) IAttachmentDo Join(table schema.Tabler, on ...field.Expr) IAttachmentDo LeftJoin(table schema.Tabler, on ...field.Expr) IAttachmentDo RightJoin(table schema.Tabler, on ...field.Expr) IAttachmentDo Group(cols ...field.Expr) IAttachmentDo Having(conds ...gen.Condition) IAttachmentDo Limit(limit int) IAttachmentDo Offset(offset int) IAttachmentDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAttachmentDo Unscoped() IAttachmentDo Create(values ...*core.Attachment) error CreateInBatches(values []*core.Attachment, batchSize int) error Save(values ...*core.Attachment) error First() (*core.Attachment, error) Take() (*core.Attachment, error) Last() (*core.Attachment, error) Find() ([]*core.Attachment, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*core.Attachment, err error) FindInBatches(result *[]*core.Attachment, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*core.Attachment) (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) IAttachmentDo Assign(attrs ...field.AssignExpr) IAttachmentDo Joins(fields ...field.RelationField) IAttachmentDo Preload(fields ...field.RelationField) IAttachmentDo FirstOrInit() (*core.Attachment, error) FirstOrCreate() (*core.Attachment, error) FindByPage(offset int, limit int) (result []*core.Attachment, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IAttachmentDo UnderlyingDB() *gorm.DB schema.Tabler CreateAttachment(ctx context.Context, att *core.Attachment) (result uint64, err error) GetAttachment(ctx context.Context, id uint64) (result *core.Attachment, err error) GetAttachmentByHashID(ctx context.Context, hashID string) (result *core.Attachment, err error) GetAttachmentByChecksum(ctx context.Context, method string, checksum string) (result *core.Attachment, err error) GetAttachmentsByStatus(ctx context.Context, status int, limit uint64) (result []*core.Attachment, err error) UpdateAttachment(ctx context.Context, att *core.Attachment) (err error) }
type Query ¶
type Query struct { Attachment attachment // contains filtered or unexported fields }
func (*Query) Transaction ¶
func (*Query) WithContext ¶
type QueryTx ¶
func (*QueryTx) RollbackTo ¶
Click to show internal directories.
Click to hide internal directories.