Skip to content

Commit 5123f49

Browse files
Add decoding for scalar graph entities (#5)
1 parent c1c4a03 commit 5123f49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/redisgraph/query_result.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ def map_scalar(type, val)
8383
# the following _should_ work
8484
# when 6 # array
8585
# val.map { |it| map_scalar(it[0], it[1]) }
86+
when 7 # relation
87+
props = val[4]
88+
return props.sort_by { |prop| prop[0] }.map { |prop| map_prop(prop) }
89+
when 8 # node
90+
props = val[2]
91+
return props.sort_by { |prop| prop[0] }.map { |prop| map_prop(prop) }
8692
end
8793
val.send(map_func)
8894
end

0 commit comments

Comments
 (0)