Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
f4b3e7e4
Commit
f4b3e7e4
authored
Aug 13, 2013
by
slene
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orm small update
parent
c6a436ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
db.go
orm/db.go
+0
-4
db_alias.go
orm/db_alias.go
+3
-3
No files found.
orm/db.go
View file @
f4b3e7e4
...
...
@@ -201,10 +201,6 @@ func (d *dbBase) Read(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.Lo
d
.
ins
.
ReplaceMarks
(
&
query
)
if
len
(
refs
)
==
21
{
fmt
.
Println
(
query
,
pkValue
)
}
row
:=
q
.
QueryRow
(
query
,
pkValue
)
if
err
:=
row
.
Scan
(
refs
...
);
err
!=
nil
{
if
err
==
sql
.
ErrNoRows
{
...
...
orm/db_alias.go
View file @
f4b3e7e4
...
...
@@ -167,7 +167,7 @@ func RegisterDriver(driverName string, typ DriverType) {
drivers
[
driverName
]
=
typ
}
else
{
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
)
}
}
...
...
@@ -177,7 +177,7 @@ func SetDataBaseTZ(name string, tz *time.Location) {
if
al
,
ok
:=
dataBaseCache
.
get
(
name
);
ok
{
al
.
TZ
=
tz
}
else
{
err
:=
fmt
.
Errorf
(
"DataBase name `%s` not registered
"
,
name
)
fmt
.
Println
(
err
)
fmt
.
Sprintf
(
"DataBase name `%s` not registered
\n
"
,
name
)
os
.
Exit
(
2
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment