Remove engine.Sql
This commit is contained in:
parent
cd5244ee2c
commit
6b71006866
|
@ -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:
|
||||
//
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue