mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:00:54 +00:00
Fix UT
This commit is contained in:
parent
1cb0ff560d
commit
9472cba6c9
@ -1361,7 +1361,7 @@ setValue:
|
|||||||
for i := 0; i < *fi.timePrecision; i++ {
|
for i := 0; i < *fi.timePrecision; i++ {
|
||||||
layout += "0"
|
layout += "0"
|
||||||
}
|
}
|
||||||
t, err = time.ParseInLocation(layout, s, tz)
|
t, err = time.ParseInLocation(layout, s[:20+*fi.timePrecision], tz)
|
||||||
} else if len(s) >= 19 {
|
} else if len(s) >= 19 {
|
||||||
s = s[:19]
|
s = s[:19]
|
||||||
t, err = time.ParseInLocation(formatDateTime, s, tz)
|
t, err = time.ParseInLocation(formatDateTime, s, tz)
|
||||||
|
@ -44,24 +44,25 @@ var sqliteOperators = map[string]string{
|
|||||||
|
|
||||||
// sqlite column types.
|
// sqlite column types.
|
||||||
var sqliteTypes = map[string]string{
|
var sqliteTypes = map[string]string{
|
||||||
"auto": "integer NOT NULL PRIMARY KEY AUTOINCREMENT",
|
"auto": "integer NOT NULL PRIMARY KEY AUTOINCREMENT",
|
||||||
"pk": "NOT NULL PRIMARY KEY",
|
"pk": "NOT NULL PRIMARY KEY",
|
||||||
"bool": "bool",
|
"bool": "bool",
|
||||||
"string": "varchar(%d)",
|
"string": "varchar(%d)",
|
||||||
"string-char": "character(%d)",
|
"string-char": "character(%d)",
|
||||||
"string-text": "text",
|
"string-text": "text",
|
||||||
"time.Time-date": "date",
|
"time.Time-date": "date",
|
||||||
"time.Time": "datetime",
|
"time.Time": "datetime",
|
||||||
"int8": "tinyint",
|
"time.Time-precision": "datetime(%d)",
|
||||||
"int16": "smallint",
|
"int8": "tinyint",
|
||||||
"int32": "integer",
|
"int16": "smallint",
|
||||||
"int64": "bigint",
|
"int32": "integer",
|
||||||
"uint8": "tinyint unsigned",
|
"int64": "bigint",
|
||||||
"uint16": "smallint unsigned",
|
"uint8": "tinyint unsigned",
|
||||||
"uint32": "integer unsigned",
|
"uint16": "smallint unsigned",
|
||||||
"uint64": "bigint unsigned",
|
"uint32": "integer unsigned",
|
||||||
"float64": "real",
|
"uint64": "bigint unsigned",
|
||||||
"float64-decimal": "decimal",
|
"float64": "real",
|
||||||
|
"float64-decimal": "decimal",
|
||||||
}
|
}
|
||||||
|
|
||||||
// sqlite dbBaser.
|
// sqlite dbBaser.
|
||||||
|
@ -506,7 +506,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Debug, _ = StrTo(DBARGS.Debug).Bool()
|
// Debug, _ = StrTo(DBARGS.Debug).Bool()
|
||||||
|
Debug = true
|
||||||
|
|
||||||
if DBARGS.Driver == "" || DBARGS.Source == "" {
|
if DBARGS.Driver == "" || DBARGS.Source == "" {
|
||||||
fmt.Println(helpinfo)
|
fmt.Println(helpinfo)
|
||||||
|
Loading…
Reference in New Issue
Block a user