29 lines
459 B
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)
|
|
}
|