Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dgraph
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
dgraph
Commits
825078f1
Commit
825078f1
authored
8 years ago
by
Pawan Rawal
Browse files
Options
Downloads
Patches
Plain Diff
Made changes to proto file for GraphResponse
parent
72d70527
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
query/pb/graphresponse.pb.go
+22
-21
22 additions, 21 deletions
query/pb/graphresponse.pb.go
query/pb/graphresponse.proto
+3
-3
3 additions, 3 deletions
query/pb/graphresponse.proto
query/query_test.go
+2
-1
2 additions, 1 deletion
query/query_test.go
with
27 additions
and
25 deletions
query/pb/graphresponse.pb.go
+
22
−
21
View file @
825078f1
...
@@ -29,7 +29,7 @@ var _ = math.Inf
...
@@ -29,7 +29,7 @@ var _ = math.Inf
const
_
=
proto
.
ProtoPackageIsVersion1
const
_
=
proto
.
ProtoPackageIsVersion1
type
UidList
struct
{
type
UidList
struct
{
Uids
[]
uint64
`protobuf:"
fixed64
,1,rep,name=uids" json:"uids,omitempty"`
Uids
[]
uint64
`protobuf:"
varint
,1,rep,name=uids" json:"uids,omitempty"`
}
}
func
(
m
*
UidList
)
Reset
()
{
*
m
=
UidList
{}
}
func
(
m
*
UidList
)
Reset
()
{
*
m
=
UidList
{}
}
...
@@ -56,8 +56,8 @@ func (m *Result) GetUidmatrix() []*UidList {
...
@@ -56,8 +56,8 @@ func (m *Result) GetUidmatrix() []*UidList {
type
GraphResponse
struct
{
type
GraphResponse
struct
{
Attribute
string
`protobuf:"bytes,1,opt,name=attribute" json:"attribute,omitempty"`
Attribute
string
`protobuf:"bytes,1,opt,name=attribute" json:"attribute,omitempty"`
Children
[]
*
GraphResponse
`protobuf:"bytes,2,
rep
,name=
children" json:"children
,omitempty"`
Result
*
Result
`protobuf:"bytes,2,
opt
,name=
result" json:"result
,omitempty"`
Result
*
Result
`protobuf:"bytes,3,
opt
,name=
result" json:"result
,omitempty"`
Children
[]
*
GraphResponse
`protobuf:"bytes,3,
rep
,name=
children" json:"children
,omitempty"`
}
}
func
(
m
*
GraphResponse
)
Reset
()
{
*
m
=
GraphResponse
{}
}
func
(
m
*
GraphResponse
)
Reset
()
{
*
m
=
GraphResponse
{}
}
...
@@ -65,16 +65,16 @@ func (m *GraphResponse) String() string { return proto.CompactTextStr
...
@@ -65,16 +65,16 @@ func (m *GraphResponse) String() string { return proto.CompactTextStr
func
(
*
GraphResponse
)
ProtoMessage
()
{}
func
(
*
GraphResponse
)
ProtoMessage
()
{}
func
(
*
GraphResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
2
}
}
func
(
*
GraphResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
2
}
}
func
(
m
*
GraphResponse
)
Get
Children
()
[]
*
GraphResponse
{
func
(
m
*
GraphResponse
)
Get
Result
()
*
Result
{
if
m
!=
nil
{
if
m
!=
nil
{
return
m
.
Children
return
m
.
Result
}
}
return
nil
return
nil
}
}
func
(
m
*
GraphResponse
)
Get
Result
()
*
Result
{
func
(
m
*
GraphResponse
)
Get
Children
()
[]
*
GraphResponse
{
if
m
!=
nil
{
if
m
!=
nil
{
return
m
.
Result
return
m
.
Children
}
}
return
nil
return
nil
}
}
...
@@ -86,18 +86,19 @@ func init() {
...
@@ -86,18 +86,19 @@ func init() {
}
}
var
fileDescriptor0
=
[]
byte
{
var
fileDescriptor0
=
[]
byte
{
// 207 bytes of a gzipped FileDescriptorProto
// 209 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x09
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x54
,
0x8f
,
0xcd
,
0x4a
,
0xc4
,
0x30
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x09
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x54
,
0x8f
,
0xbf
,
0x4a
,
0xc5
,
0x30
,
0x14
,
0x46
,
0x69
,
0x2b
,
0xd1
,
0xde
,
0xea
,
0xc2
,
0x2b
,
0x48
,
0x17
,
0x0a
,
0x92
,
0x55
,
0x5d
,
0xd8
,
0x14
,
0xc6
,
0xc9
,
0xbd
,
0x25
,
0xda
,
0x53
,
0x1d
,
0x3c
,
0x82
,
0x74
,
0x50
,
0x90
,
0x4c
,
0x75
,
0xb0
,
0x45
,
0x7d
,
0x08
,
0x17
,
0xba
,
0xba
,
0xe0
,
0x03
,
0x24
,
0x36
,
0xd8
,
0x40
,
0x6d
,
0x43
,
0x7e
,
0x64
,
0x83
,
0x3e
,
0x84
,
0x83
,
0x4e
,
0x07
,
0x7c
,
0x80
,
0xc4
,
0x06
,
0x1b
,
0xa8
,
0x6d
,
0xc8
,
0x1f
,
0x71
,
0x96
,
0xf3
,
0xe8
,
0x93
,
0xb6
,
0x61
,
0xca
,
0xec
,
0x92
,
0x9c
,
0x8f
,
0xc3
,
0x09
,
0x3c
,
0xfc
,
0x5a
,
0xf4
,
0xd1
,
0x4d
,
0xd3
,
0x60
,
0xb9
,
0x5b
,
0x92
,
0xdf
,
0xc7
,
0xef
,
0xfb
,
0x02
,
0xd7
,
0x9f
,
0x4e
,
0x61
,
0x06
,
0xab
,
0x9c
,
0x99
,
0x27
,
0xa7
,
0x5a
,
0x63
,
0x67
,
0x3f
,
0x63
,
0x6e
,
0x24
,
0x7f
,
0x86
,
0xda
,
0xd1
,
0x69
,
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b
,
0xdc
,
0xbc
,
0x85
,
0x5a
,
0x86
,
0xc4
,
0x54
,
0x0c
,
0x3a
,
0x79
,
0x59
,
0x57
,
0xd3
,
0xfe
,
0x80
,
0x02
,
0xb8
,
0xfc
,
0x0c
,
0x7a
,
0xec
,
0xad
,
0x9a
,
0x92
,
0xf9
,
0x7e
,
0x31
,
0x5f
,
0x28
,
0xe8
,
0x3c
,
0x41
,
0x0e
,
0xcb
,
0xe5
,
0xc9
,
0xcb
,
0x92
,
0x17
,
0x56
,
0xef
,
0x36
,
0x87
,
0x0a
,
0xc1
,
0x47
,
0x38
,
0xff
,
0x18
,
0xcc
,
0xae
,
0xad
,
0x75
,
0x11
,
0x4d
,
0x55
,
0x07
,
0xcb
,
0x78
,
0xab
,
0xa7
,
0x44
,
0x24
,
0x5b
,
0x7f
,
0xcd
,
0x34
,
0x38
,
0x3d
,
0xb7
,
0xc7
,
0xdc
,
0x7e
,
0xb5
,
0xa6
,
0x4e
,
0x6a
,
0xe8
,
0x3f
,
0xa2
,
0x78
,
0xfe
,
0x7e
,
0x0a
,
0x00
,
0x00
,
0xff
,
0xff
,
0x26
,
0xe5
,
0x36
,
0x59
,
0x10
,
0x01
,
0x00
,
0x00
,
0xfe
,
0xf9
,
0xf3
,
0x5f
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xc1
,
0x1f
,
0x18
,
0x20
,
0x10
,
0x01
,
0x00
,
0x00
,
}
}
This diff is collapsed.
Click to expand it.
query/pb/graphresponse.proto
+
3
−
3
View file @
825078f1
...
@@ -2,7 +2,7 @@ syntax="proto3";
...
@@ -2,7 +2,7 @@ syntax="proto3";
package
pb
;
package
pb
;
message
UidList
{
message
UidList
{
repeated
fixed
64
uids
=
1
;
repeated
uint
64
uids
=
1
;
}
}
message
Result
{
message
Result
{
...
@@ -12,6 +12,6 @@ message Result {
...
@@ -12,6 +12,6 @@ message Result {
message
GraphResponse
{
message
GraphResponse
{
string
attribute
=
1
;
string
attribute
=
1
;
repeated
GraphResponse
children
=
2
;
//Each node can have multiple children
Result
result
=
2
;
Result
result
=
3
;
repeated
GraphResponse
children
=
3
;
// Each node can have multiple children
}
}
This diff is collapsed.
Click to expand it.
query/query_test.go
+
2
−
1
View file @
825078f1
...
@@ -375,7 +375,8 @@ func TestToProtocolBuffer(t *testing.T) {
...
@@ -375,7 +375,8 @@ func TestToProtocolBuffer(t *testing.T) {
t
.
Errorf
(
"Expected attr name. Got: %v"
,
child
.
Attribute
)
t
.
Errorf
(
"Expected attr name. Got: %v"
,
child
.
Attribute
)
}
}
if
string
(
child
.
Result
.
Values
[
0
])
!=
"Michonne"
{
if
string
(
child
.
Result
.
Values
[
0
])
!=
"Michonne"
{
t
.
Errorf
(
"Expected value Michonne. Got %v"
,
string
(
child
.
Result
.
Values
[
0
]))
t
.
Errorf
(
"Expected value Michonne. Got %v"
,
string
(
child
.
Result
.
Values
[
0
]))
}
}
child
=
ugr
.
Children
[
3
]
child
=
ugr
.
Children
[
3
]
if
child
.
Attribute
!=
"friend"
{
if
child
.
Attribute
!=
"friend"
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment