Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1c52f683
authored
2013-12-17 16:46:14 +0800
by
slene
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug in postgres
1 parent
436f9a74
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
orm/db.go
orm/orm_test.go
orm/db.go
View file @
1c52f68
...
...
@@ -1135,6 +1135,8 @@ func (d *dbBase) ReadValues(q dbQuerier, qs *querySet, mi *modelInfo, cond *Cond
query
:=
fmt
.
Sprintf
(
"SELECT %s FROM %s%s%s T0 %s%s%s%s"
,
sels
,
Q
,
mi
.
table
,
Q
,
join
,
where
,
orderBy
,
limit
)
d
.
ins
.
ReplaceMarks
(
&
query
)
var
rs
*
sql
.
Rows
if
r
,
err
:=
q
.
Query
(
query
,
args
...
);
err
!=
nil
{
return
0
,
err
...
...
orm/orm_test.go
View file @
1c52f68
...
...
@@ -766,6 +766,10 @@ func TestValues(t *testing.T) {
throwFail
(
t
,
AssertIs
(
maps
[
0
][
"Profile__Age"
],
28
))
throwFail
(
t
,
AssertIs
(
maps
[
2
][
"Profile__Age"
],
nil
))
}
num
,
err
=
qs
.
Filter
(
"UserName"
,
"slene"
)
.
Values
(
&
maps
)
throwFail
(
t
,
err
)
throwFail
(
t
,
AssertIs
(
num
,
1
))
}
func
TestValuesList
(
t
*
testing
.
T
)
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment