use x.SQL instead of x.Sql

This commit is contained in:
Lunny Xiao 2016-11-10 15:20:48 +08:00
parent 145648a233
commit 7dcc3bc3d7
4 changed files with 5 additions and 5 deletions

View file

@ -628,7 +628,7 @@ func convertDateToUnix(x *xorm.Engine) (err error) {
offset := 0
for {
beans := make([]*Bean, 0, 100)
if err = x.Sql(fmt.Sprintf("SELECT * FROM `%s` ORDER BY id ASC LIMIT 100 OFFSET %d",
if err = x.SQL(fmt.Sprintf("SELECT * FROM `%s` ORDER BY id ASC LIMIT 100 OFFSET %d",
table.name, offset)).Find(&beans); err != nil {
return fmt.Errorf("select beans [table: %s, offset: %d]: %v", table.name, offset, err)
}