func (p *_Posts) Delete(ctx context.Context, db database.DB, models ...*Post) (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.Delete(ctx, p.Model, queryModels...)
}
// Delete deletes Post models in database.
Delete deletes Post models in database.
// Delete deletes Post models in database .
func (p *_Posts) Delete(ctx context.Context, db database.DB, models ...*Post) (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.Delete(ctx, p.Model, queryModels...)
}
func ( p * _Posts ) Delete ( ctx context . Context , db database . DB , models ... * Post ) ( 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 . Delete ( ctx , p . Model , queryModels ... ) }
Delete deletes Post models in database.
Delete deletes Post models in database .