From 6b710068665f784b29c150dd3b967534938716fc Mon Sep 17 00:00:00 2001 From: yyoshiki41 Date: Wed, 5 Oct 2016 00:56:53 +0900 Subject: [PATCH] Remove engine.Sql --- engine.go | 5 ----- examples/derive.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/engine.go b/engine.go index 286aa417..11a941cb 100644 --- a/engine.go +++ b/engine.go @@ -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: // diff --git a/examples/derive.go b/examples/derive.go index fa1e0b1a..d0c24218 100644 --- a/examples/derive.go +++ b/examples/derive.go @@ -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)