This repository has been archived on 2020-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
tests/testQuery.go

29 lines
459 B
Go

package tests
import (
"fmt"
"testing"
"xorm.io/xorm"
)
func testQuery(engine *xorm.Engine, t *testing.T) {
sql := "select * from userinfo"
results, err := engine.Query(sql)
if err != nil {
t.Error(err)
panic(err)
}
fmt.Println(results)
}
func testQuerySameMapper(engine *xorm.Engine, t *testing.T) {
sql := "select * from `Userinfo`"
results, err := engine.Query(sql)
if err != nil {
t.Error(err)
panic(err)
}
fmt.Println(results)
}