// Update updates Blog models into database.
Update updates Blog models into database.
// Update updates Blog models into database .
func (b *_Blogs) Update(ctx context.Context, db database.DB, models ...*Blog) (int64, error) {
	if len(models) == 0 {
		return 0, errors.Wrap(query.ErrNoModels, "nothing to insert")
	}
	queryModels := make([]mapping.Model, len(models))
	for i, model := range models {
		queryModels[i] = model
	}
	return db.Update(ctx, b.Model, queryModels...)
}
func ( b * _Blogs ) Update ( ctx context . Context , db database . DB , models ... * Blog ) ( int64 , error ) { if len ( models ) == 0 { return 0 , errors . Wrap ( query . ErrNoModels , " " ) } queryModels := make ( [ ] mapping . Model , len ( models ) ) for i , model := range models { queryModels [ i ] = model } return db . Update ( ctx , b . Model , queryModels ... ) }
Update updates Blog models into database.
Update updates Blog models into database .