dao

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q                        = new(Query)
	Content                  *content
	ContentAttribute         *contentAttribute
	ContentCollection        *contentCollection
	ContentCollectionContent *contentCollectionContent
	MetadataSource           *metadataSource
	Torrent                  *torrent
	TorrentContent           *torrentContent
	TorrentFile              *torrentFile
	TorrentSource            *torrentSource
	TorrentsTorrentSource    *torrentsTorrentSource
)

Functions

func SetDefault

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

Types

type IContentAttributeDo

type IContentAttributeDo interface {
	gen.SubQuery
	Debug() IContentAttributeDo
	WithContext(ctx context.Context) IContentAttributeDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IContentAttributeDo
	WriteDB() IContentAttributeDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IContentAttributeDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IContentAttributeDo
	Not(conds ...gen.Condition) IContentAttributeDo
	Or(conds ...gen.Condition) IContentAttributeDo
	Select(conds ...field.Expr) IContentAttributeDo
	Where(conds ...gen.Condition) IContentAttributeDo
	Order(conds ...field.Expr) IContentAttributeDo
	Distinct(cols ...field.Expr) IContentAttributeDo
	Omit(cols ...field.Expr) IContentAttributeDo
	Join(table schema.Tabler, on ...field.Expr) IContentAttributeDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IContentAttributeDo
	RightJoin(table schema.Tabler, on ...field.Expr) IContentAttributeDo
	Group(cols ...field.Expr) IContentAttributeDo
	Having(conds ...gen.Condition) IContentAttributeDo
	Limit(limit int) IContentAttributeDo
	Offset(offset int) IContentAttributeDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IContentAttributeDo
	Unscoped() IContentAttributeDo
	Create(values ...*model.ContentAttribute) error
	CreateInBatches(values []*model.ContentAttribute, batchSize int) error
	Save(values ...*model.ContentAttribute) error
	First() (*model.ContentAttribute, error)
	Take() (*model.ContentAttribute, error)
	Last() (*model.ContentAttribute, error)
	Find() ([]*model.ContentAttribute, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.ContentAttribute, err error)
	FindInBatches(result *[]*model.ContentAttribute, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.ContentAttribute) (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) IContentAttributeDo
	Assign(attrs ...field.AssignExpr) IContentAttributeDo
	Joins(fields ...field.RelationField) IContentAttributeDo
	Preload(fields ...field.RelationField) IContentAttributeDo
	FirstOrInit() (*model.ContentAttribute, error)
	FirstOrCreate() (*model.ContentAttribute, error)
	FindByPage(offset int, limit int) (result []*model.ContentAttribute, 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) IContentAttributeDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IContentCollectionContentDo

type IContentCollectionContentDo interface {
	gen.SubQuery
	Debug() IContentCollectionContentDo
	WithContext(ctx context.Context) IContentCollectionContentDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IContentCollectionContentDo
	WriteDB() IContentCollectionContentDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IContentCollectionContentDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IContentCollectionContentDo
	Not(conds ...gen.Condition) IContentCollectionContentDo
	Or(conds ...gen.Condition) IContentCollectionContentDo
	Select(conds ...field.Expr) IContentCollectionContentDo
	Where(conds ...gen.Condition) IContentCollectionContentDo
	Order(conds ...field.Expr) IContentCollectionContentDo
	Distinct(cols ...field.Expr) IContentCollectionContentDo
	Omit(cols ...field.Expr) IContentCollectionContentDo
	Join(table schema.Tabler, on ...field.Expr) IContentCollectionContentDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IContentCollectionContentDo
	RightJoin(table schema.Tabler, on ...field.Expr) IContentCollectionContentDo
	Group(cols ...field.Expr) IContentCollectionContentDo
	Having(conds ...gen.Condition) IContentCollectionContentDo
	Limit(limit int) IContentCollectionContentDo
	Offset(offset int) IContentCollectionContentDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IContentCollectionContentDo
	Unscoped() IContentCollectionContentDo
	Create(values ...*model.ContentCollectionContent) error
	CreateInBatches(values []*model.ContentCollectionContent, batchSize int) error
	Save(values ...*model.ContentCollectionContent) error
	First() (*model.ContentCollectionContent, error)
	Take() (*model.ContentCollectionContent, error)
	Last() (*model.ContentCollectionContent, error)
	Find() ([]*model.ContentCollectionContent, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.ContentCollectionContent, err error)
	FindInBatches(result *[]*model.ContentCollectionContent, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.ContentCollectionContent) (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) IContentCollectionContentDo
	Assign(attrs ...field.AssignExpr) IContentCollectionContentDo
	Joins(fields ...field.RelationField) IContentCollectionContentDo
	Preload(fields ...field.RelationField) IContentCollectionContentDo
	FirstOrInit() (*model.ContentCollectionContent, error)
	FirstOrCreate() (*model.ContentCollectionContent, error)
	FindByPage(offset int, limit int) (result []*model.ContentCollectionContent, 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) IContentCollectionContentDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IContentCollectionDo

type IContentCollectionDo interface {
	gen.SubQuery
	Debug() IContentCollectionDo
	WithContext(ctx context.Context) IContentCollectionDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IContentCollectionDo
	WriteDB() IContentCollectionDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IContentCollectionDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IContentCollectionDo
	Not(conds ...gen.Condition) IContentCollectionDo
	Or(conds ...gen.Condition) IContentCollectionDo
	Select(conds ...field.Expr) IContentCollectionDo
	Where(conds ...gen.Condition) IContentCollectionDo
	Order(conds ...field.Expr) IContentCollectionDo
	Distinct(cols ...field.Expr) IContentCollectionDo
	Omit(cols ...field.Expr) IContentCollectionDo
	Join(table schema.Tabler, on ...field.Expr) IContentCollectionDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IContentCollectionDo
	RightJoin(table schema.Tabler, on ...field.Expr) IContentCollectionDo
	Group(cols ...field.Expr) IContentCollectionDo
	Having(conds ...gen.Condition) IContentCollectionDo
	Limit(limit int) IContentCollectionDo
	Offset(offset int) IContentCollectionDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IContentCollectionDo
	Unscoped() IContentCollectionDo
	Create(values ...*model.ContentCollection) error
	CreateInBatches(values []*model.ContentCollection, batchSize int) error
	Save(values ...*model.ContentCollection) error
	First() (*model.ContentCollection, error)
	Take() (*model.ContentCollection, error)
	Last() (*model.ContentCollection, error)
	Find() ([]*model.ContentCollection, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.ContentCollection, err error)
	FindInBatches(result *[]*model.ContentCollection, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.ContentCollection) (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) IContentCollectionDo
	Assign(attrs ...field.AssignExpr) IContentCollectionDo
	Joins(fields ...field.RelationField) IContentCollectionDo
	Preload(fields ...field.RelationField) IContentCollectionDo
	FirstOrInit() (*model.ContentCollection, error)
	FirstOrCreate() (*model.ContentCollection, error)
	FindByPage(offset int, limit int) (result []*model.ContentCollection, 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) IContentCollectionDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IContentDo

type IContentDo interface {
	gen.SubQuery
	Debug() IContentDo
	WithContext(ctx context.Context) IContentDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IContentDo
	WriteDB() IContentDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IContentDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IContentDo
	Not(conds ...gen.Condition) IContentDo
	Or(conds ...gen.Condition) IContentDo
	Select(conds ...field.Expr) IContentDo
	Where(conds ...gen.Condition) IContentDo
	Order(conds ...field.Expr) IContentDo
	Distinct(cols ...field.Expr) IContentDo
	Omit(cols ...field.Expr) IContentDo
	Join(table schema.Tabler, on ...field.Expr) IContentDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IContentDo
	RightJoin(table schema.Tabler, on ...field.Expr) IContentDo
	Group(cols ...field.Expr) IContentDo
	Having(conds ...gen.Condition) IContentDo
	Limit(limit int) IContentDo
	Offset(offset int) IContentDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IContentDo
	Unscoped() IContentDo
	Create(values ...*model.Content) error
	CreateInBatches(values []*model.Content, batchSize int) error
	Save(values ...*model.Content) error
	First() (*model.Content, error)
	Take() (*model.Content, error)
	Last() (*model.Content, error)
	Find() ([]*model.Content, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Content, err error)
	FindInBatches(result *[]*model.Content, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.Content) (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) IContentDo
	Assign(attrs ...field.AssignExpr) IContentDo
	Joins(fields ...field.RelationField) IContentDo
	Preload(fields ...field.RelationField) IContentDo
	FirstOrInit() (*model.Content, error)
	FirstOrCreate() (*model.Content, error)
	FindByPage(offset int, limit int) (result []*model.Content, 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) IContentDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IMetadataSourceDo

type IMetadataSourceDo interface {
	gen.SubQuery
	Debug() IMetadataSourceDo
	WithContext(ctx context.Context) IMetadataSourceDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IMetadataSourceDo
	WriteDB() IMetadataSourceDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IMetadataSourceDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IMetadataSourceDo
	Not(conds ...gen.Condition) IMetadataSourceDo
	Or(conds ...gen.Condition) IMetadataSourceDo
	Select(conds ...field.Expr) IMetadataSourceDo
	Where(conds ...gen.Condition) IMetadataSourceDo
	Order(conds ...field.Expr) IMetadataSourceDo
	Distinct(cols ...field.Expr) IMetadataSourceDo
	Omit(cols ...field.Expr) IMetadataSourceDo
	Join(table schema.Tabler, on ...field.Expr) IMetadataSourceDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IMetadataSourceDo
	RightJoin(table schema.Tabler, on ...field.Expr) IMetadataSourceDo
	Group(cols ...field.Expr) IMetadataSourceDo
	Having(conds ...gen.Condition) IMetadataSourceDo
	Limit(limit int) IMetadataSourceDo
	Offset(offset int) IMetadataSourceDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IMetadataSourceDo
	Unscoped() IMetadataSourceDo
	Create(values ...*model.MetadataSource) error
	CreateInBatches(values []*model.MetadataSource, batchSize int) error
	Save(values ...*model.MetadataSource) error
	First() (*model.MetadataSource, error)
	Take() (*model.MetadataSource, error)
	Last() (*model.MetadataSource, error)
	Find() ([]*model.MetadataSource, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.MetadataSource, err error)
	FindInBatches(result *[]*model.MetadataSource, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.MetadataSource) (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) IMetadataSourceDo
	Assign(attrs ...field.AssignExpr) IMetadataSourceDo
	Joins(fields ...field.RelationField) IMetadataSourceDo
	Preload(fields ...field.RelationField) IMetadataSourceDo
	FirstOrInit() (*model.MetadataSource, error)
	FirstOrCreate() (*model.MetadataSource, error)
	FindByPage(offset int, limit int) (result []*model.MetadataSource, 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) IMetadataSourceDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type ITorrentContentDo

type ITorrentContentDo interface {
	gen.SubQuery
	Debug() ITorrentContentDo
	WithContext(ctx context.Context) ITorrentContentDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() ITorrentContentDo
	WriteDB() ITorrentContentDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) ITorrentContentDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) ITorrentContentDo
	Not(conds ...gen.Condition) ITorrentContentDo
	Or(conds ...gen.Condition) ITorrentContentDo
	Select(conds ...field.Expr) ITorrentContentDo
	Where(conds ...gen.Condition) ITorrentContentDo
	Order(conds ...field.Expr) ITorrentContentDo
	Distinct(cols ...field.Expr) ITorrentContentDo
	Omit(cols ...field.Expr) ITorrentContentDo
	Join(table schema.Tabler, on ...field.Expr) ITorrentContentDo
	LeftJoin(table schema.Tabler, on ...field.Expr) ITorrentContentDo
	RightJoin(table schema.Tabler, on ...field.Expr) ITorrentContentDo
	Group(cols ...field.Expr) ITorrentContentDo
	Having(conds ...gen.Condition) ITorrentContentDo
	Limit(limit int) ITorrentContentDo
	Offset(offset int) ITorrentContentDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) ITorrentContentDo
	Unscoped() ITorrentContentDo
	Create(values ...*model.TorrentContent) error
	CreateInBatches(values []*model.TorrentContent, batchSize int) error
	Save(values ...*model.TorrentContent) error
	First() (*model.TorrentContent, error)
	Take() (*model.TorrentContent, error)
	Last() (*model.TorrentContent, error)
	Find() ([]*model.TorrentContent, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.TorrentContent, err error)
	FindInBatches(result *[]*model.TorrentContent, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.TorrentContent) (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) ITorrentContentDo
	Assign(attrs ...field.AssignExpr) ITorrentContentDo
	Joins(fields ...field.RelationField) ITorrentContentDo
	Preload(fields ...field.RelationField) ITorrentContentDo
	FirstOrInit() (*model.TorrentContent, error)
	FirstOrCreate() (*model.TorrentContent, error)
	FindByPage(offset int, limit int) (result []*model.TorrentContent, 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) ITorrentContentDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type ITorrentDo

type ITorrentDo interface {
	gen.SubQuery
	Debug() ITorrentDo
	WithContext(ctx context.Context) ITorrentDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() ITorrentDo
	WriteDB() ITorrentDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) ITorrentDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) ITorrentDo
	Not(conds ...gen.Condition) ITorrentDo
	Or(conds ...gen.Condition) ITorrentDo
	Select(conds ...field.Expr) ITorrentDo
	Where(conds ...gen.Condition) ITorrentDo
	Order(conds ...field.Expr) ITorrentDo
	Distinct(cols ...field.Expr) ITorrentDo
	Omit(cols ...field.Expr) ITorrentDo
	Join(table schema.Tabler, on ...field.Expr) ITorrentDo
	LeftJoin(table schema.Tabler, on ...field.Expr) ITorrentDo
	RightJoin(table schema.Tabler, on ...field.Expr) ITorrentDo
	Group(cols ...field.Expr) ITorrentDo
	Having(conds ...gen.Condition) ITorrentDo
	Limit(limit int) ITorrentDo
	Offset(offset int) ITorrentDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) ITorrentDo
	Unscoped() ITorrentDo
	Create(values ...*model.Torrent) error
	CreateInBatches(values []*model.Torrent, batchSize int) error
	Save(values ...*model.Torrent) error
	First() (*model.Torrent, error)
	Take() (*model.Torrent, error)
	Last() (*model.Torrent, error)
	Find() ([]*model.Torrent, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Torrent, err error)
	FindInBatches(result *[]*model.Torrent, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.Torrent) (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) ITorrentDo
	Assign(attrs ...field.AssignExpr) ITorrentDo
	Joins(fields ...field.RelationField) ITorrentDo
	Preload(fields ...field.RelationField) ITorrentDo
	FirstOrInit() (*model.Torrent, error)
	FirstOrCreate() (*model.Torrent, error)
	FindByPage(offset int, limit int) (result []*model.Torrent, 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) ITorrentDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type ITorrentFileDo

type ITorrentFileDo interface {
	gen.SubQuery
	Debug() ITorrentFileDo
	WithContext(ctx context.Context) ITorrentFileDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() ITorrentFileDo
	WriteDB() ITorrentFileDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) ITorrentFileDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) ITorrentFileDo
	Not(conds ...gen.Condition) ITorrentFileDo
	Or(conds ...gen.Condition) ITorrentFileDo
	Select(conds ...field.Expr) ITorrentFileDo
	Where(conds ...gen.Condition) ITorrentFileDo
	Order(conds ...field.Expr) ITorrentFileDo
	Distinct(cols ...field.Expr) ITorrentFileDo
	Omit(cols ...field.Expr) ITorrentFileDo
	Join(table schema.Tabler, on ...field.Expr) ITorrentFileDo
	LeftJoin(table schema.Tabler, on ...field.Expr) ITorrentFileDo
	RightJoin(table schema.Tabler, on ...field.Expr) ITorrentFileDo
	Group(cols ...field.Expr) ITorrentFileDo
	Having(conds ...gen.Condition) ITorrentFileDo
	Limit(limit int) ITorrentFileDo
	Offset(offset int) ITorrentFileDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) ITorrentFileDo
	Unscoped() ITorrentFileDo
	Create(values ...*model.TorrentFile) error
	CreateInBatches(values []*model.TorrentFile, batchSize int) error
	Save(values ...*model.TorrentFile) error
	First() (*model.TorrentFile, error)
	Take() (*model.TorrentFile, error)
	Last() (*model.TorrentFile, error)
	Find() ([]*model.TorrentFile, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.TorrentFile, err error)
	FindInBatches(result *[]*model.TorrentFile, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.TorrentFile) (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) ITorrentFileDo
	Assign(attrs ...field.AssignExpr) ITorrentFileDo
	Joins(fields ...field.RelationField) ITorrentFileDo
	Preload(fields ...field.RelationField) ITorrentFileDo
	FirstOrInit() (*model.TorrentFile, error)
	FirstOrCreate() (*model.TorrentFile, error)
	FindByPage(offset int, limit int) (result []*model.TorrentFile, 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) ITorrentFileDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type ITorrentSourceDo

type ITorrentSourceDo interface {
	gen.SubQuery
	Debug() ITorrentSourceDo
	WithContext(ctx context.Context) ITorrentSourceDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() ITorrentSourceDo
	WriteDB() ITorrentSourceDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) ITorrentSourceDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) ITorrentSourceDo
	Not(conds ...gen.Condition) ITorrentSourceDo
	Or(conds ...gen.Condition) ITorrentSourceDo
	Select(conds ...field.Expr) ITorrentSourceDo
	Where(conds ...gen.Condition) ITorrentSourceDo
	Order(conds ...field.Expr) ITorrentSourceDo
	Distinct(cols ...field.Expr) ITorrentSourceDo
	Omit(cols ...field.Expr) ITorrentSourceDo
	Join(table schema.Tabler, on ...field.Expr) ITorrentSourceDo
	LeftJoin(table schema.Tabler, on ...field.Expr) ITorrentSourceDo
	RightJoin(table schema.Tabler, on ...field.Expr) ITorrentSourceDo
	Group(cols ...field.Expr) ITorrentSourceDo
	Having(conds ...gen.Condition) ITorrentSourceDo
	Limit(limit int) ITorrentSourceDo
	Offset(offset int) ITorrentSourceDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) ITorrentSourceDo
	Unscoped() ITorrentSourceDo
	Create(values ...*model.TorrentSource) error
	CreateInBatches(values []*model.TorrentSource, batchSize int) error
	Save(values ...*model.TorrentSource) error
	First() (*model.TorrentSource, error)
	Take() (*model.TorrentSource, error)
	Last() (*model.TorrentSource, error)
	Find() ([]*model.TorrentSource, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.TorrentSource, err error)
	FindInBatches(result *[]*model.TorrentSource, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.TorrentSource) (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) ITorrentSourceDo
	Assign(attrs ...field.AssignExpr) ITorrentSourceDo
	Joins(fields ...field.RelationField) ITorrentSourceDo
	Preload(fields ...field.RelationField) ITorrentSourceDo
	FirstOrInit() (*model.TorrentSource, error)
	FirstOrCreate() (*model.TorrentSource, error)
	FindByPage(offset int, limit int) (result []*model.TorrentSource, 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) ITorrentSourceDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type ITorrentsTorrentSourceDo

type ITorrentsTorrentSourceDo interface {
	gen.SubQuery
	Debug() ITorrentsTorrentSourceDo
	WithContext(ctx context.Context) ITorrentsTorrentSourceDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() ITorrentsTorrentSourceDo
	WriteDB() ITorrentsTorrentSourceDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) ITorrentsTorrentSourceDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) ITorrentsTorrentSourceDo
	Not(conds ...gen.Condition) ITorrentsTorrentSourceDo
	Or(conds ...gen.Condition) ITorrentsTorrentSourceDo
	Select(conds ...field.Expr) ITorrentsTorrentSourceDo
	Where(conds ...gen.Condition) ITorrentsTorrentSourceDo
	Order(conds ...field.Expr) ITorrentsTorrentSourceDo
	Distinct(cols ...field.Expr) ITorrentsTorrentSourceDo
	Omit(cols ...field.Expr) ITorrentsTorrentSourceDo
	Join(table schema.Tabler, on ...field.Expr) ITorrentsTorrentSourceDo
	LeftJoin(table schema.Tabler, on ...field.Expr) ITorrentsTorrentSourceDo
	RightJoin(table schema.Tabler, on ...field.Expr) ITorrentsTorrentSourceDo
	Group(cols ...field.Expr) ITorrentsTorrentSourceDo
	Having(conds ...gen.Condition) ITorrentsTorrentSourceDo
	Limit(limit int) ITorrentsTorrentSourceDo
	Offset(offset int) ITorrentsTorrentSourceDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) ITorrentsTorrentSourceDo
	Unscoped() ITorrentsTorrentSourceDo
	Create(values ...*model.TorrentsTorrentSource) error
	CreateInBatches(values []*model.TorrentsTorrentSource, batchSize int) error
	Save(values ...*model.TorrentsTorrentSource) error
	First() (*model.TorrentsTorrentSource, error)
	Take() (*model.TorrentsTorrentSource, error)
	Last() (*model.TorrentsTorrentSource, error)
	Find() ([]*model.TorrentsTorrentSource, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.TorrentsTorrentSource, err error)
	FindInBatches(result *[]*model.TorrentsTorrentSource, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.TorrentsTorrentSource) (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) ITorrentsTorrentSourceDo
	Assign(attrs ...field.AssignExpr) ITorrentsTorrentSourceDo
	Joins(fields ...field.RelationField) ITorrentsTorrentSourceDo
	Preload(fields ...field.RelationField) ITorrentsTorrentSourceDo
	FirstOrInit() (*model.TorrentsTorrentSource, error)
	FirstOrCreate() (*model.TorrentsTorrentSource, error)
	FindByPage(offset int, limit int) (result []*model.TorrentsTorrentSource, 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) ITorrentsTorrentSourceDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type Params

type Params struct {
	fx.In
	GormDb *gorm.DB
}

type Query

type Query struct {
	Content                  content
	ContentAttribute         contentAttribute
	ContentCollection        contentCollection
	ContentCollectionContent contentCollectionContent
	MetadataSource           metadataSource
	Torrent                  torrent
	TorrentContent           torrentContent
	TorrentFile              torrentFile
	TorrentSource            torrentSource
	TorrentsTorrentSource    torrentsTorrentSource
	// 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) 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

type Result

type Result struct {
	fx.Out
	Dao *Query
}

func New

func New(p Params) (r Result, err error)

Jump to

Keyboard shortcuts

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