## session作原生查询 直接返回结果集 ```go // 原生sql res,err := DB().Query("select * from users where uid>? limit 2", 1) fmt.Println(res) affected_rows,err := DB().Execute("delete from users where uid=?", 1) fmt.Println(affected_rows, err) ``` 也可以绑定查询结果到给定对象 ```go session := engin.NewSession() var u = make(map[string]interface{}) session := engin.NewSession() // 这里Bind()是为了存放结果的, 如果你使用的是NewOrm()初始化,则可以直接使用 NewOrm().Table().Query() _,err := session.Bind(&u).Query("select * from users where uid=? limit 2", 1) ``` ## 更改操作 ```go session := engin.NewSession() session.Execute("insert into users(name,age) values(?,?)(?,?)", "gorose",18,"fizzday",19) session.Execute("update users set name=? where uid=?","gorose",1) session.Execute("delete from users where uid=?", 1) // 事务, 用法跟orm的事务类似 session.Transaction() session.LastSql() ```