Fix test
This commit is contained in:
parent
b4c44f9acf
commit
0b74265790
|
@ -13,8 +13,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"xorm.io/xorm/convert"
|
||||||
"xorm.io/xorm/core"
|
"xorm.io/xorm/core"
|
||||||
"xorm.io/xorm/internal/convert"
|
|
||||||
"xorm.io/xorm/internal/utils"
|
"xorm.io/xorm/internal/utils"
|
||||||
"xorm.io/xorm/schemas"
|
"xorm.io/xorm/schemas"
|
||||||
)
|
)
|
||||||
|
|
|
@ -119,7 +119,7 @@ func (db *Base) URI() *URI {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateTableSQL implements Dialect
|
// CreateTableSQL implements Dialect
|
||||||
func (db *Base) CreateTableSQL(table *schemas.Table, tableName string) ([]string, bool) {
|
func (db *Base) CreateTableSQL(ctx context.Context, queryer core.Queryer, table *schemas.Table, tableName string) (string, bool, error) {
|
||||||
if tableName == "" {
|
if tableName == "" {
|
||||||
tableName = table.Name
|
tableName = table.Name
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ func (db *Base) CreateTableSQL(table *schemas.Table, tableName string) ([]string
|
||||||
|
|
||||||
b.WriteString(")")
|
b.WriteString(")")
|
||||||
|
|
||||||
return []string{b.String()}, false
|
return b.String(), false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *Base) CreateSequenceSQL(ctx context.Context, queryer core.Queryer, seqName string) (string, error) {
|
func (db *Base) CreateSequenceSQL(ctx context.Context, queryer core.Queryer, seqName string) (string, error) {
|
||||||
|
|
|
@ -631,7 +631,7 @@ WHERE IXS.TYPE_DESC='NONCLUSTERED' and OBJECT_NAME(IXS.OBJECT_ID) =?
|
||||||
return indexes, nil
|
return indexes, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *mssql) CreateTableSQL(table *schemas.Table, tableName string) ([]string, bool) {
|
func (db *mssql) CreateTableSQL(ctx context.Context, queryer core.Queryer, table *schemas.Table, tableName string) (string, bool, error) {
|
||||||
if tableName == "" {
|
if tableName == "" {
|
||||||
tableName = table.Name
|
tableName = table.Name
|
||||||
}
|
}
|
||||||
|
@ -662,7 +662,7 @@ func (db *mssql) CreateTableSQL(table *schemas.Table, tableName string) ([]strin
|
||||||
|
|
||||||
b.WriteString(")")
|
b.WriteString(")")
|
||||||
|
|
||||||
return []string{b.String()}, true
|
return b.String(), true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *mssql) ForUpdateSQL(query string) string {
|
func (db *mssql) ForUpdateSQL(query string) string {
|
||||||
|
|
|
@ -631,7 +631,7 @@ func (db *mysql) GetIndexes(queryer core.Queryer, ctx context.Context, tableName
|
||||||
return indexes, nil
|
return indexes, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *mysql) CreateTableSQL(table *schemas.Table, tableName string) ([]string, bool) {
|
func (db *mysql) CreateTableSQL(ctx context.Context, queryer core.Queryer, table *schemas.Table, tableName string) (string, bool, error) {
|
||||||
if tableName == "" {
|
if tableName == "" {
|
||||||
tableName = table.Name
|
tableName = table.Name
|
||||||
}
|
}
|
||||||
|
@ -684,15 +684,8 @@ func (db *mysql) CreateTableSQL(table *schemas.Table, tableName string) ([]strin
|
||||||
b.WriteString(" ROW_FORMAT=")
|
b.WriteString(" ROW_FORMAT=")
|
||||||
b.WriteString(db.rowFormat)
|
b.WriteString(db.rowFormat)
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
return b.String(), true, nil
|
||||||
return []string{b.String()}, true
|
|
||||||
=======
|
|
||||||
return []string{sql}, true, nil
|
|
||||||
>>>>>>> 4dbe145 (fix insert)
|
|
||||||
=======
|
|
||||||
return sql, true, nil
|
|
||||||
>>>>>>> 21b6352 (Fix more bugs)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *mysql) Filters() []Filter {
|
func (db *mysql) Filters() []Filter {
|
||||||
|
|
|
@ -15,6 +15,7 @@ import (
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
"xorm.io/xorm/contexts"
|
"xorm.io/xorm/contexts"
|
||||||
"xorm.io/xorm/convert"
|
"xorm.io/xorm/convert"
|
||||||
|
"xorm.io/xorm/dialects"
|
||||||
"xorm.io/xorm/schemas"
|
"xorm.io/xorm/schemas"
|
||||||
|
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
|
|
Loading…
Reference in New Issue