1
0
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:
ngaut
2015-09-10 16:31:53 +08:00
parent c6448727de
commit c73e0395ed
6 changed files with 236 additions and 3 deletions

View File

@ -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)