mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:00:54 +00:00
orm small update
This commit is contained in:
parent
c6a436ed5d
commit
f4b3e7e4d2
@ -201,10 +201,6 @@ func (d *dbBase) Read(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.Lo
|
|||||||
|
|
||||||
d.ins.ReplaceMarks(&query)
|
d.ins.ReplaceMarks(&query)
|
||||||
|
|
||||||
if len(refs) == 21 {
|
|
||||||
fmt.Println(query, pkValue)
|
|
||||||
}
|
|
||||||
|
|
||||||
row := q.QueryRow(query, pkValue)
|
row := q.QueryRow(query, pkValue)
|
||||||
if err := row.Scan(refs...); err != nil {
|
if err := row.Scan(refs...); err != nil {
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
|
@ -167,7 +167,7 @@ func RegisterDriver(driverName string, typ DriverType) {
|
|||||||
drivers[driverName] = typ
|
drivers[driverName] = typ
|
||||||
} else {
|
} else {
|
||||||
if t != typ {
|
if t != typ {
|
||||||
fmt.Println("driverName `%s` db driver already registered and is other type")
|
fmt.Sprintf("driverName `%s` db driver already registered and is other type\n", driverName)
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ func SetDataBaseTZ(name string, tz *time.Location) {
|
|||||||
if al, ok := dataBaseCache.get(name); ok {
|
if al, ok := dataBaseCache.get(name); ok {
|
||||||
al.TZ = tz
|
al.TZ = tz
|
||||||
} else {
|
} else {
|
||||||
err := fmt.Errorf("DataBase name `%s` not registered", name)
|
fmt.Sprintf("DataBase name `%s` not registered\n", name)
|
||||||
fmt.Println(err)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user