Remove engine.Sql

This commit is contained in:
yyoshiki41 2016-10-05 00:56:53 +09:00
parent cd5244ee2c
commit 6b71006866
2 changed files with 1 additions and 6 deletions

View File

@ -290,11 +290,6 @@ func (engine *Engine) logSQLExecutionTime(sqlStr string, args []interface{}, exe
return executionBlock()
}
// Sql will be depracated, please use SQL instead
func (engine *Engine) Sql(querystring string, args ...interface{}) *Session {
return engine.SQL(querystring, args...)
}
// SQL method let's you manualy write raw SQL and operate
// For example:
//

View File

@ -56,7 +56,7 @@ func main() {
fmt.Println(info)
infos := make([]LoginInfo1, 0)
err = Orm.Sql(`select *, (select name from user where id = login_info.user_id) as user_name from
err = Orm.SQL(`select *, (select name from user where id = login_info.user_id) as user_name from
login_info limit 10`).Find(&infos)
if err != nil {
fmt.Println(err)