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