0

Does redis-graph support storing complex data in a property of a node. I'm interested in storing a SET f.e. :

age : 35, data : set([1,3,4])

may be you can provide python example how to do that ?


for example when I try this :

In [15]: test4 = Node(label='test4', properties={'abc': set([1,2,3]), 'age': 33})

In [16]: redis_graph.add_node(test4)

In [17]: redis_graph.commit()

ResponseError: Syntax error at offset 183 near 'set'

sten
  • 7,028
  • 9
  • 41
  • 63
  • Please read and follow the posting guidelines in the help documentation, as suggested when you created this account. [On topic](http://stackoverflow.com/help/on-topic), [how to ask](http://stackoverflow.com/help/how-to-ask), and [... the perfect question](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) apply here. StackOverflow is not a design, coding, research, or tutorial resource. However, if you follow whatever resources you find on line, make an honest coding attempt, and run into a problem, you'd have a good example to post. – Prune Apr 09 '19 at 16:17

1 Answers1

0

It seems the only way is to stringify it ;(

test4 = Node(label='test4', properties={'abc': str( set([1,2,3]) ), 'age': 33})

then when extracted :

s = eval(rg.query('match(t:test4) return t.abc'))
sten
  • 7,028
  • 9
  • 41
  • 63