Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
f4d8ec54
Commit
f4d8ec54
authored
Jan 08, 2019
by
张振华
Committed by
33cn
Jan 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jointable-bugfix
parent
76334d1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
join.go
vendor/github.com/33cn/chain33/common/db/table/join.go
+2
-1
No files found.
vendor/github.com/33cn/chain33/common/db/table/join.go
View file @
f4d8ec54
...
@@ -91,7 +91,7 @@ func NewJoinTable(left *Table, right *Table, indexes []string) (*JoinTable, erro
...
@@ -91,7 +91,7 @@ func NewJoinTable(left *Table, right *Table, indexes []string) (*JoinTable, erro
join
.
leftIndex
=
append
(
join
.
leftIndex
,
joinindex
[
0
])
join
.
leftIndex
=
append
(
join
.
leftIndex
,
joinindex
[
0
])
}
}
if
joinindex
[
1
]
==
""
||
!
right
.
canGet
(
joinindex
[
1
])
{
if
joinindex
[
1
]
==
""
||
!
right
.
canGet
(
joinindex
[
1
])
{
return
nil
,
errors
.
New
(
"jointable:
lef
t table can not get: "
+
joinindex
[
1
])
return
nil
,
errors
.
New
(
"jointable:
righ
t table can not get: "
+
joinindex
[
1
])
}
}
if
joinindex
[
1
]
!=
""
{
if
joinindex
[
1
]
!=
""
{
join
.
rightIndex
=
append
(
join
.
rightIndex
,
joinindex
[
1
])
join
.
rightIndex
=
append
(
join
.
rightIndex
,
joinindex
[
1
])
...
@@ -160,6 +160,7 @@ func (join *JoinTable) GetData(primaryKey []byte) (*Row, error) {
...
@@ -160,6 +160,7 @@ func (join *JoinTable) GetData(primaryKey []byte) (*Row, error) {
}
}
rowjoin
:=
join
.
meta
.
CreateRow
()
rowjoin
:=
join
.
meta
.
CreateRow
()
rowjoin
.
Ty
=
None
rowjoin
.
Ty
=
None
rowjoin
.
Primary
=
leftrow
.
Primary
rowjoin
.
Data
.
(
*
JoinData
)
.
Left
=
leftrow
.
Data
rowjoin
.
Data
.
(
*
JoinData
)
.
Left
=
leftrow
.
Data
rowjoin
.
Data
.
(
*
JoinData
)
.
Right
=
rightrow
.
Data
rowjoin
.
Data
.
(
*
JoinData
)
.
Right
=
rightrow
.
Data
return
rowjoin
,
nil
return
rowjoin
,
nil
...
...
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