Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decoding for scalar graph entities #5

Merged
merged 1 commit into from Apr 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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