Documentation ¶
Index ¶
- Variables
- func SetDefault(db *gorm.DB, opts ...gen.DOOption)
- type IAdminDo
- type IAnnouncementDo
- type IAnnouncementReadRecordDo
- type IDayReviewStatisticDo
- type IDeckDo
- type IExportInfoDo
- type IFloderDo
- type IKnowledgeDo
- type IRecordDo
- type ISectionDo
- type IUserDo
- 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) Admin *admin Announcement *announcement AnnouncementReadRecord *announcementReadRecord DayReviewStatistic *dayReviewStatistic Deck *deck ExportInfo *exportInfo Floder *floder Knowledge *knowledge Record *record Section *section User *user )
Functions ¶
Types ¶
type IAdminDo ¶
type IAdminDo interface { gen.SubQuery Debug() IAdminDo WithContext(ctx context.Context) IAdminDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAdminDo WriteDB() IAdminDo As(alias string) gen.Dao Session(config *gorm.Session) IAdminDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAdminDo Not(conds ...gen.Condition) IAdminDo Or(conds ...gen.Condition) IAdminDo Select(conds ...field.Expr) IAdminDo Where(conds ...gen.Condition) IAdminDo Order(conds ...field.Expr) IAdminDo Distinct(cols ...field.Expr) IAdminDo Omit(cols ...field.Expr) IAdminDo Join(table schema.Tabler, on ...field.Expr) IAdminDo LeftJoin(table schema.Tabler, on ...field.Expr) IAdminDo RightJoin(table schema.Tabler, on ...field.Expr) IAdminDo Group(cols ...field.Expr) IAdminDo Having(conds ...gen.Condition) IAdminDo Limit(limit int) IAdminDo Offset(offset int) IAdminDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAdminDo Unscoped() IAdminDo Create(values ...*model.Admin) error CreateInBatches(values []*model.Admin, batchSize int) error Save(values ...*model.Admin) error First() (*model.Admin, error) Take() (*model.Admin, error) Last() (*model.Admin, error) Find() ([]*model.Admin, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Admin, err error) FindInBatches(result *[]*model.Admin, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Admin) (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) IAdminDo Assign(attrs ...field.AssignExpr) IAdminDo Joins(fields ...field.RelationField) IAdminDo Preload(fields ...field.RelationField) IAdminDo FirstOrInit() (*model.Admin, error) FirstOrCreate() (*model.Admin, error) FindByPage(offset int, limit int) (result []*model.Admin, 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) IAdminDo UnderlyingDB() *gorm.DB schema.Tabler }
type IAnnouncementDo ¶
type IAnnouncementDo interface { gen.SubQuery Debug() IAnnouncementDo WithContext(ctx context.Context) IAnnouncementDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAnnouncementDo WriteDB() IAnnouncementDo As(alias string) gen.Dao Session(config *gorm.Session) IAnnouncementDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAnnouncementDo Not(conds ...gen.Condition) IAnnouncementDo Or(conds ...gen.Condition) IAnnouncementDo Select(conds ...field.Expr) IAnnouncementDo Where(conds ...gen.Condition) IAnnouncementDo Order(conds ...field.Expr) IAnnouncementDo Distinct(cols ...field.Expr) IAnnouncementDo Omit(cols ...field.Expr) IAnnouncementDo Join(table schema.Tabler, on ...field.Expr) IAnnouncementDo LeftJoin(table schema.Tabler, on ...field.Expr) IAnnouncementDo RightJoin(table schema.Tabler, on ...field.Expr) IAnnouncementDo Group(cols ...field.Expr) IAnnouncementDo Having(conds ...gen.Condition) IAnnouncementDo Limit(limit int) IAnnouncementDo Offset(offset int) IAnnouncementDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAnnouncementDo Unscoped() IAnnouncementDo Create(values ...*model.Announcement) error CreateInBatches(values []*model.Announcement, batchSize int) error Save(values ...*model.Announcement) error First() (*model.Announcement, error) Take() (*model.Announcement, error) Last() (*model.Announcement, error) Find() ([]*model.Announcement, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Announcement, err error) FindInBatches(result *[]*model.Announcement, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Announcement) (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) IAnnouncementDo Assign(attrs ...field.AssignExpr) IAnnouncementDo Joins(fields ...field.RelationField) IAnnouncementDo Preload(fields ...field.RelationField) IAnnouncementDo FirstOrInit() (*model.Announcement, error) FirstOrCreate() (*model.Announcement, error) FindByPage(offset int, limit int) (result []*model.Announcement, 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) IAnnouncementDo UnderlyingDB() *gorm.DB schema.Tabler }
type IAnnouncementReadRecordDo ¶
type IAnnouncementReadRecordDo interface { gen.SubQuery Debug() IAnnouncementReadRecordDo WithContext(ctx context.Context) IAnnouncementReadRecordDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAnnouncementReadRecordDo WriteDB() IAnnouncementReadRecordDo As(alias string) gen.Dao Session(config *gorm.Session) IAnnouncementReadRecordDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAnnouncementReadRecordDo Not(conds ...gen.Condition) IAnnouncementReadRecordDo Or(conds ...gen.Condition) IAnnouncementReadRecordDo Select(conds ...field.Expr) IAnnouncementReadRecordDo Where(conds ...gen.Condition) IAnnouncementReadRecordDo Order(conds ...field.Expr) IAnnouncementReadRecordDo Distinct(cols ...field.Expr) IAnnouncementReadRecordDo Omit(cols ...field.Expr) IAnnouncementReadRecordDo Join(table schema.Tabler, on ...field.Expr) IAnnouncementReadRecordDo LeftJoin(table schema.Tabler, on ...field.Expr) IAnnouncementReadRecordDo RightJoin(table schema.Tabler, on ...field.Expr) IAnnouncementReadRecordDo Group(cols ...field.Expr) IAnnouncementReadRecordDo Having(conds ...gen.Condition) IAnnouncementReadRecordDo Limit(limit int) IAnnouncementReadRecordDo Offset(offset int) IAnnouncementReadRecordDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAnnouncementReadRecordDo Unscoped() IAnnouncementReadRecordDo Create(values ...*model.AnnouncementReadRecord) error CreateInBatches(values []*model.AnnouncementReadRecord, batchSize int) error Save(values ...*model.AnnouncementReadRecord) error First() (*model.AnnouncementReadRecord, error) Take() (*model.AnnouncementReadRecord, error) Last() (*model.AnnouncementReadRecord, error) Find() ([]*model.AnnouncementReadRecord, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.AnnouncementReadRecord, err error) FindInBatches(result *[]*model.AnnouncementReadRecord, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.AnnouncementReadRecord) (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) IAnnouncementReadRecordDo Assign(attrs ...field.AssignExpr) IAnnouncementReadRecordDo Joins(fields ...field.RelationField) IAnnouncementReadRecordDo Preload(fields ...field.RelationField) IAnnouncementReadRecordDo FirstOrInit() (*model.AnnouncementReadRecord, error) FirstOrCreate() (*model.AnnouncementReadRecord, error) FindByPage(offset int, limit int) (result []*model.AnnouncementReadRecord, 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) IAnnouncementReadRecordDo UnderlyingDB() *gorm.DB schema.Tabler }
type IDayReviewStatisticDo ¶
type IDayReviewStatisticDo interface { gen.SubQuery Debug() IDayReviewStatisticDo WithContext(ctx context.Context) IDayReviewStatisticDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IDayReviewStatisticDo WriteDB() IDayReviewStatisticDo As(alias string) gen.Dao Session(config *gorm.Session) IDayReviewStatisticDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IDayReviewStatisticDo Not(conds ...gen.Condition) IDayReviewStatisticDo Or(conds ...gen.Condition) IDayReviewStatisticDo Select(conds ...field.Expr) IDayReviewStatisticDo Where(conds ...gen.Condition) IDayReviewStatisticDo Order(conds ...field.Expr) IDayReviewStatisticDo Distinct(cols ...field.Expr) IDayReviewStatisticDo Omit(cols ...field.Expr) IDayReviewStatisticDo Join(table schema.Tabler, on ...field.Expr) IDayReviewStatisticDo LeftJoin(table schema.Tabler, on ...field.Expr) IDayReviewStatisticDo RightJoin(table schema.Tabler, on ...field.Expr) IDayReviewStatisticDo Group(cols ...field.Expr) IDayReviewStatisticDo Having(conds ...gen.Condition) IDayReviewStatisticDo Limit(limit int) IDayReviewStatisticDo Offset(offset int) IDayReviewStatisticDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IDayReviewStatisticDo Unscoped() IDayReviewStatisticDo Create(values ...*model.DayReviewStatistic) error CreateInBatches(values []*model.DayReviewStatistic, batchSize int) error Save(values ...*model.DayReviewStatistic) error First() (*model.DayReviewStatistic, error) Take() (*model.DayReviewStatistic, error) Last() (*model.DayReviewStatistic, error) Find() ([]*model.DayReviewStatistic, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.DayReviewStatistic, err error) FindInBatches(result *[]*model.DayReviewStatistic, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.DayReviewStatistic) (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) IDayReviewStatisticDo Assign(attrs ...field.AssignExpr) IDayReviewStatisticDo Joins(fields ...field.RelationField) IDayReviewStatisticDo Preload(fields ...field.RelationField) IDayReviewStatisticDo FirstOrInit() (*model.DayReviewStatistic, error) FirstOrCreate() (*model.DayReviewStatistic, error) FindByPage(offset int, limit int) (result []*model.DayReviewStatistic, 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) IDayReviewStatisticDo UnderlyingDB() *gorm.DB schema.Tabler }
type IDeckDo ¶
type IDeckDo interface { gen.SubQuery Debug() IDeckDo WithContext(ctx context.Context) IDeckDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IDeckDo WriteDB() IDeckDo As(alias string) gen.Dao Session(config *gorm.Session) IDeckDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IDeckDo Not(conds ...gen.Condition) IDeckDo Or(conds ...gen.Condition) IDeckDo Select(conds ...field.Expr) IDeckDo Where(conds ...gen.Condition) IDeckDo Order(conds ...field.Expr) IDeckDo Distinct(cols ...field.Expr) IDeckDo Omit(cols ...field.Expr) IDeckDo Join(table schema.Tabler, on ...field.Expr) IDeckDo LeftJoin(table schema.Tabler, on ...field.Expr) IDeckDo RightJoin(table schema.Tabler, on ...field.Expr) IDeckDo Group(cols ...field.Expr) IDeckDo Having(conds ...gen.Condition) IDeckDo Limit(limit int) IDeckDo Offset(offset int) IDeckDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IDeckDo Unscoped() IDeckDo Create(values ...*model.Deck) error CreateInBatches(values []*model.Deck, batchSize int) error Save(values ...*model.Deck) error First() (*model.Deck, error) Take() (*model.Deck, error) Last() (*model.Deck, error) Find() ([]*model.Deck, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Deck, err error) FindInBatches(result *[]*model.Deck, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Deck) (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) IDeckDo Assign(attrs ...field.AssignExpr) IDeckDo Joins(fields ...field.RelationField) IDeckDo Preload(fields ...field.RelationField) IDeckDo FirstOrInit() (*model.Deck, error) FirstOrCreate() (*model.Deck, error) FindByPage(offset int, limit int) (result []*model.Deck, 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) IDeckDo UnderlyingDB() *gorm.DB schema.Tabler }
type IExportInfoDo ¶
type IExportInfoDo interface { gen.SubQuery Debug() IExportInfoDo WithContext(ctx context.Context) IExportInfoDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IExportInfoDo WriteDB() IExportInfoDo As(alias string) gen.Dao Session(config *gorm.Session) IExportInfoDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IExportInfoDo Not(conds ...gen.Condition) IExportInfoDo Or(conds ...gen.Condition) IExportInfoDo Select(conds ...field.Expr) IExportInfoDo Where(conds ...gen.Condition) IExportInfoDo Order(conds ...field.Expr) IExportInfoDo Distinct(cols ...field.Expr) IExportInfoDo Omit(cols ...field.Expr) IExportInfoDo Join(table schema.Tabler, on ...field.Expr) IExportInfoDo LeftJoin(table schema.Tabler, on ...field.Expr) IExportInfoDo RightJoin(table schema.Tabler, on ...field.Expr) IExportInfoDo Group(cols ...field.Expr) IExportInfoDo Having(conds ...gen.Condition) IExportInfoDo Limit(limit int) IExportInfoDo Offset(offset int) IExportInfoDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IExportInfoDo Unscoped() IExportInfoDo Create(values ...*model.ExportInfo) error CreateInBatches(values []*model.ExportInfo, batchSize int) error Save(values ...*model.ExportInfo) error First() (*model.ExportInfo, error) Take() (*model.ExportInfo, error) Last() (*model.ExportInfo, error) Find() ([]*model.ExportInfo, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.ExportInfo, err error) FindInBatches(result *[]*model.ExportInfo, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.ExportInfo) (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) IExportInfoDo Assign(attrs ...field.AssignExpr) IExportInfoDo Joins(fields ...field.RelationField) IExportInfoDo Preload(fields ...field.RelationField) IExportInfoDo FirstOrInit() (*model.ExportInfo, error) FirstOrCreate() (*model.ExportInfo, error) FindByPage(offset int, limit int) (result []*model.ExportInfo, 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) IExportInfoDo UnderlyingDB() *gorm.DB schema.Tabler }
type IFloderDo ¶
type IFloderDo interface { gen.SubQuery Debug() IFloderDo WithContext(ctx context.Context) IFloderDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IFloderDo WriteDB() IFloderDo As(alias string) gen.Dao Session(config *gorm.Session) IFloderDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IFloderDo Not(conds ...gen.Condition) IFloderDo Or(conds ...gen.Condition) IFloderDo Select(conds ...field.Expr) IFloderDo Where(conds ...gen.Condition) IFloderDo Order(conds ...field.Expr) IFloderDo Distinct(cols ...field.Expr) IFloderDo Omit(cols ...field.Expr) IFloderDo Join(table schema.Tabler, on ...field.Expr) IFloderDo LeftJoin(table schema.Tabler, on ...field.Expr) IFloderDo RightJoin(table schema.Tabler, on ...field.Expr) IFloderDo Group(cols ...field.Expr) IFloderDo Having(conds ...gen.Condition) IFloderDo Limit(limit int) IFloderDo Offset(offset int) IFloderDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IFloderDo Unscoped() IFloderDo Create(values ...*model.Floder) error CreateInBatches(values []*model.Floder, batchSize int) error Save(values ...*model.Floder) error First() (*model.Floder, error) Take() (*model.Floder, error) Last() (*model.Floder, error) Find() ([]*model.Floder, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Floder, err error) FindInBatches(result *[]*model.Floder, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Floder) (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) IFloderDo Assign(attrs ...field.AssignExpr) IFloderDo Joins(fields ...field.RelationField) IFloderDo Preload(fields ...field.RelationField) IFloderDo FirstOrInit() (*model.Floder, error) FirstOrCreate() (*model.Floder, error) FindByPage(offset int, limit int) (result []*model.Floder, 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) IFloderDo UnderlyingDB() *gorm.DB schema.Tabler }
type IKnowledgeDo ¶
type IKnowledgeDo interface { gen.SubQuery Debug() IKnowledgeDo WithContext(ctx context.Context) IKnowledgeDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IKnowledgeDo WriteDB() IKnowledgeDo As(alias string) gen.Dao Session(config *gorm.Session) IKnowledgeDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IKnowledgeDo Not(conds ...gen.Condition) IKnowledgeDo Or(conds ...gen.Condition) IKnowledgeDo Select(conds ...field.Expr) IKnowledgeDo Where(conds ...gen.Condition) IKnowledgeDo Order(conds ...field.Expr) IKnowledgeDo Distinct(cols ...field.Expr) IKnowledgeDo Omit(cols ...field.Expr) IKnowledgeDo Join(table schema.Tabler, on ...field.Expr) IKnowledgeDo LeftJoin(table schema.Tabler, on ...field.Expr) IKnowledgeDo RightJoin(table schema.Tabler, on ...field.Expr) IKnowledgeDo Group(cols ...field.Expr) IKnowledgeDo Having(conds ...gen.Condition) IKnowledgeDo Limit(limit int) IKnowledgeDo Offset(offset int) IKnowledgeDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IKnowledgeDo Unscoped() IKnowledgeDo Create(values ...*model.Knowledge) error CreateInBatches(values []*model.Knowledge, batchSize int) error Save(values ...*model.Knowledge) error First() (*model.Knowledge, error) Take() (*model.Knowledge, error) Last() (*model.Knowledge, error) Find() ([]*model.Knowledge, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Knowledge, err error) FindInBatches(result *[]*model.Knowledge, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Knowledge) (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) IKnowledgeDo Assign(attrs ...field.AssignExpr) IKnowledgeDo Joins(fields ...field.RelationField) IKnowledgeDo Preload(fields ...field.RelationField) IKnowledgeDo FirstOrInit() (*model.Knowledge, error) FirstOrCreate() (*model.Knowledge, error) FindByPage(offset int, limit int) (result []*model.Knowledge, 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) IKnowledgeDo UnderlyingDB() *gorm.DB schema.Tabler }
type IRecordDo ¶
type IRecordDo interface { gen.SubQuery Debug() IRecordDo WithContext(ctx context.Context) IRecordDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IRecordDo WriteDB() IRecordDo As(alias string) gen.Dao Session(config *gorm.Session) IRecordDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IRecordDo Not(conds ...gen.Condition) IRecordDo Or(conds ...gen.Condition) IRecordDo Select(conds ...field.Expr) IRecordDo Where(conds ...gen.Condition) IRecordDo Order(conds ...field.Expr) IRecordDo Distinct(cols ...field.Expr) IRecordDo Omit(cols ...field.Expr) IRecordDo Join(table schema.Tabler, on ...field.Expr) IRecordDo LeftJoin(table schema.Tabler, on ...field.Expr) IRecordDo RightJoin(table schema.Tabler, on ...field.Expr) IRecordDo Group(cols ...field.Expr) IRecordDo Having(conds ...gen.Condition) IRecordDo Limit(limit int) IRecordDo Offset(offset int) IRecordDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IRecordDo Unscoped() IRecordDo Create(values ...*model.Record) error CreateInBatches(values []*model.Record, batchSize int) error Save(values ...*model.Record) error First() (*model.Record, error) Take() (*model.Record, error) Last() (*model.Record, error) Find() ([]*model.Record, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Record, err error) FindInBatches(result *[]*model.Record, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Record) (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) IRecordDo Assign(attrs ...field.AssignExpr) IRecordDo Joins(fields ...field.RelationField) IRecordDo Preload(fields ...field.RelationField) IRecordDo FirstOrInit() (*model.Record, error) FirstOrCreate() (*model.Record, error) FindByPage(offset int, limit int) (result []*model.Record, 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) IRecordDo UnderlyingDB() *gorm.DB schema.Tabler }
type ISectionDo ¶
type ISectionDo interface { gen.SubQuery Debug() ISectionDo WithContext(ctx context.Context) ISectionDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() ISectionDo WriteDB() ISectionDo As(alias string) gen.Dao Session(config *gorm.Session) ISectionDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) ISectionDo Not(conds ...gen.Condition) ISectionDo Or(conds ...gen.Condition) ISectionDo Select(conds ...field.Expr) ISectionDo Where(conds ...gen.Condition) ISectionDo Order(conds ...field.Expr) ISectionDo Distinct(cols ...field.Expr) ISectionDo Omit(cols ...field.Expr) ISectionDo Join(table schema.Tabler, on ...field.Expr) ISectionDo LeftJoin(table schema.Tabler, on ...field.Expr) ISectionDo RightJoin(table schema.Tabler, on ...field.Expr) ISectionDo Group(cols ...field.Expr) ISectionDo Having(conds ...gen.Condition) ISectionDo Limit(limit int) ISectionDo Offset(offset int) ISectionDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) ISectionDo Unscoped() ISectionDo Create(values ...*model.Section) error CreateInBatches(values []*model.Section, batchSize int) error Save(values ...*model.Section) error First() (*model.Section, error) Take() (*model.Section, error) Last() (*model.Section, error) Find() ([]*model.Section, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Section, err error) FindInBatches(result *[]*model.Section, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Section) (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) ISectionDo Assign(attrs ...field.AssignExpr) ISectionDo Joins(fields ...field.RelationField) ISectionDo Preload(fields ...field.RelationField) ISectionDo FirstOrInit() (*model.Section, error) FirstOrCreate() (*model.Section, error) FindByPage(offset int, limit int) (result []*model.Section, 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) ISectionDo UnderlyingDB() *gorm.DB schema.Tabler }
type IUserDo ¶
type IUserDo interface { gen.SubQuery Debug() IUserDo WithContext(ctx context.Context) IUserDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IUserDo WriteDB() IUserDo As(alias string) gen.Dao Session(config *gorm.Session) IUserDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IUserDo Not(conds ...gen.Condition) IUserDo Or(conds ...gen.Condition) IUserDo Select(conds ...field.Expr) IUserDo Where(conds ...gen.Condition) IUserDo Order(conds ...field.Expr) IUserDo Distinct(cols ...field.Expr) IUserDo Omit(cols ...field.Expr) IUserDo Join(table schema.Tabler, on ...field.Expr) IUserDo LeftJoin(table schema.Tabler, on ...field.Expr) IUserDo RightJoin(table schema.Tabler, on ...field.Expr) IUserDo Group(cols ...field.Expr) IUserDo Having(conds ...gen.Condition) IUserDo Limit(limit int) IUserDo Offset(offset int) IUserDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IUserDo Unscoped() IUserDo Create(values ...*model.User) error CreateInBatches(values []*model.User, batchSize int) error Save(values ...*model.User) error First() (*model.User, error) Take() (*model.User, error) Last() (*model.User, error) Find() ([]*model.User, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.User, err error) FindInBatches(result *[]*model.User, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.User) (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) IUserDo Assign(attrs ...field.AssignExpr) IUserDo Joins(fields ...field.RelationField) IUserDo Preload(fields ...field.RelationField) IUserDo FirstOrInit() (*model.User, error) FirstOrCreate() (*model.User, error) FindByPage(offset int, limit int) (result []*model.User, 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) IUserDo UnderlyingDB() *gorm.DB schema.Tabler }
type Query ¶
type Query struct { Admin admin Announcement announcement AnnouncementReadRecord announcementReadRecord DayReviewStatistic dayReviewStatistic Deck deck ExportInfo exportInfo Floder floder Knowledge knowledge Record record Section section User user // 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.