db.go 224 B

12345678
  1. package dao
  2. import "github.com/pkg/errors"
  3. func (d *Dao) Raw(sql string, args map[string]interface{}, r interface{}) error {
  4. e := d.DB.Raw(sql, args).Scan(r).Error
  5. return errors.Wrapf(e, "model Raw %s, %v", sql, args)
  6. }