Skip to content

Commit

Permalink
Add decoding for scalar graph entities (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreylovitz committed Apr 8, 2020
1 parent c1c4a03 commit 5123f49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/redisgraph/query_result.rb
Expand Up @@ -83,6 +83,12 @@ def map_scalar(type, val)
# the following _should_ work
# when 6 # array
# val.map { |it| map_scalar(it[0], it[1]) }
when 7 # relation
props = val[4]
return props.sort_by { |prop| prop[0] }.map { |prop| map_prop(prop) }
when 8 # node
props = val[2]
return props.sort_by { |prop| prop[0] }.map { |prop| map_prop(prop) }
end
val.send(map_func)
end
Expand Down

0 comments on commit 5123f49

Please sign in to comment.