mirror of
https://github.com/astaxie/beego.git
synced 2025-07-04 13:10:19 +00:00
Orm: Support TiDB
This commit is contained in:
@ -702,7 +702,7 @@ func TestOperators(t *testing.T) {
|
||||
|
||||
var shouldNum int
|
||||
|
||||
if IsSqlite {
|
||||
if IsSqlite || IsTidb {
|
||||
shouldNum = 2
|
||||
} else {
|
||||
shouldNum = 0
|
||||
@ -740,7 +740,7 @@ func TestOperators(t *testing.T) {
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 1))
|
||||
|
||||
if IsSqlite {
|
||||
if IsSqlite || IsTidb {
|
||||
shouldNum = 1
|
||||
} else {
|
||||
shouldNum = 0
|
||||
@ -758,7 +758,7 @@ func TestOperators(t *testing.T) {
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 2))
|
||||
|
||||
if IsSqlite {
|
||||
if IsSqlite || IsTidb {
|
||||
shouldNum = 2
|
||||
} else {
|
||||
shouldNum = 0
|
||||
@ -986,6 +986,10 @@ func TestValuesFlat(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRelatedSel(t *testing.T) {
|
||||
if IsTidb {
|
||||
// Skip it. TiDB does not support relation now.
|
||||
return
|
||||
}
|
||||
qs := dORM.QueryTable("user")
|
||||
num, err := qs.Filter("profile__age", 28).Count()
|
||||
throwFail(t, err)
|
||||
|
Reference in New Issue
Block a user