Documentation ¶
Index ¶
- Variables
- func SetDefault(db *gorm.DB, opts ...gen.DOOption)
- type IKeyModelDo
- type IKeyRotatedModelDo
- 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) KeyModel *keyModel KeyRotatedModel *keyRotatedModel )
Functions ¶
Types ¶
type IKeyModelDo ¶
type IKeyModelDo interface { gen.SubQuery Debug() IKeyModelDo WithContext(ctx context.Context) IKeyModelDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IKeyModelDo WriteDB() IKeyModelDo As(alias string) gen.Dao Session(config *gorm.Session) IKeyModelDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IKeyModelDo Not(conds ...gen.Condition) IKeyModelDo Or(conds ...gen.Condition) IKeyModelDo Select(conds ...field.Expr) IKeyModelDo Where(conds ...gen.Condition) IKeyModelDo Order(conds ...field.Expr) IKeyModelDo Distinct(cols ...field.Expr) IKeyModelDo Omit(cols ...field.Expr) IKeyModelDo Join(table schema.Tabler, on ...field.Expr) IKeyModelDo LeftJoin(table schema.Tabler, on ...field.Expr) IKeyModelDo RightJoin(table schema.Tabler, on ...field.Expr) IKeyModelDo Group(cols ...field.Expr) IKeyModelDo Having(conds ...gen.Condition) IKeyModelDo Limit(limit int) IKeyModelDo Offset(offset int) IKeyModelDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IKeyModelDo Unscoped() IKeyModelDo Create(values ...*dbmodel.KeyModel) error CreateInBatches(values []*dbmodel.KeyModel, batchSize int) error Save(values ...*dbmodel.KeyModel) error First() (*dbmodel.KeyModel, error) Take() (*dbmodel.KeyModel, error) Last() (*dbmodel.KeyModel, error) Find() ([]*dbmodel.KeyModel, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*dbmodel.KeyModel, err error) FindInBatches(result *[]*dbmodel.KeyModel, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*dbmodel.KeyModel) (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) IKeyModelDo Assign(attrs ...field.AssignExpr) IKeyModelDo Joins(fields ...field.RelationField) IKeyModelDo Preload(fields ...field.RelationField) IKeyModelDo FirstOrInit() (*dbmodel.KeyModel, error) FirstOrCreate() (*dbmodel.KeyModel, error) FindByPage(offset int, limit int) (result []*dbmodel.KeyModel, 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) IKeyModelDo UnderlyingDB() *gorm.DB schema.Tabler GetByID(id string) (result *dbmodel.KeyModel, err error) }
type IKeyRotatedModelDo ¶
type IKeyRotatedModelDo interface { gen.SubQuery Debug() IKeyRotatedModelDo WithContext(ctx context.Context) IKeyRotatedModelDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IKeyRotatedModelDo WriteDB() IKeyRotatedModelDo As(alias string) gen.Dao Session(config *gorm.Session) IKeyRotatedModelDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IKeyRotatedModelDo Not(conds ...gen.Condition) IKeyRotatedModelDo Or(conds ...gen.Condition) IKeyRotatedModelDo Select(conds ...field.Expr) IKeyRotatedModelDo Where(conds ...gen.Condition) IKeyRotatedModelDo Order(conds ...field.Expr) IKeyRotatedModelDo Distinct(cols ...field.Expr) IKeyRotatedModelDo Omit(cols ...field.Expr) IKeyRotatedModelDo Join(table schema.Tabler, on ...field.Expr) IKeyRotatedModelDo LeftJoin(table schema.Tabler, on ...field.Expr) IKeyRotatedModelDo RightJoin(table schema.Tabler, on ...field.Expr) IKeyRotatedModelDo Group(cols ...field.Expr) IKeyRotatedModelDo Having(conds ...gen.Condition) IKeyRotatedModelDo Limit(limit int) IKeyRotatedModelDo Offset(offset int) IKeyRotatedModelDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IKeyRotatedModelDo Unscoped() IKeyRotatedModelDo Create(values ...*dbmodel.KeyRotatedModel) error CreateInBatches(values []*dbmodel.KeyRotatedModel, batchSize int) error Save(values ...*dbmodel.KeyRotatedModel) error First() (*dbmodel.KeyRotatedModel, error) Take() (*dbmodel.KeyRotatedModel, error) Last() (*dbmodel.KeyRotatedModel, error) Find() ([]*dbmodel.KeyRotatedModel, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*dbmodel.KeyRotatedModel, err error) FindInBatches(result *[]*dbmodel.KeyRotatedModel, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*dbmodel.KeyRotatedModel) (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) IKeyRotatedModelDo Assign(attrs ...field.AssignExpr) IKeyRotatedModelDo Joins(fields ...field.RelationField) IKeyRotatedModelDo Preload(fields ...field.RelationField) IKeyRotatedModelDo FirstOrInit() (*dbmodel.KeyRotatedModel, error) FirstOrCreate() (*dbmodel.KeyRotatedModel, error) FindByPage(offset int, limit int) (result []*dbmodel.KeyRotatedModel, 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) IKeyRotatedModelDo UnderlyingDB() *gorm.DB schema.Tabler GetByID(id string) (result *dbmodel.KeyRotatedModel, err error) }
type Query ¶
type Query struct { KeyModel keyModel KeyRotatedModel keyRotatedModel // contains filtered or unexported fields }
func (*Query) Transaction ¶
func (*Query) WithContext ¶
Click to show internal directories.
Click to hide internal directories.