@@ -162,15 +162,25 @@ def _build_params_header(self, params):
162
162
# Header starts with "CYPHER"
163
163
params_header = "CYPHER "
164
164
for key , value in params .items ():
165
- # If value is string add quotation marks.
166
- if isinstance (value , str ):
167
- value = quote_string (value )
168
- # Value is None, replace with "null" string.
169
- elif value is None :
170
- value = "null"
171
- params_header += str (key ) + "=" + str (value ) + " "
165
+ params_header += str (key ) + "=" + str (self ._parse_value (value )) + " "
172
166
return params_header
173
167
168
+ def _parse_value (self , value ):
169
+ # If value is string add quotation marks.
170
+ if isinstance (value , str ):
171
+ value = quote_string (value )
172
+ # If value is dictionary, need to remove quotation mark
173
+ elif isinstance (value , dict ):
174
+ temp_value = "{"
175
+ for key , val in value .items ():
176
+ temp_value += str (key ) + ":" + str (val ) + ","
177
+ value = temp_value [:- 1 ] + "}"
178
+ # Value is None, replace with "null" string.
179
+ elif value is None :
180
+ value = "null"
181
+
182
+ return value
183
+
174
184
def query (self , q , params = None , timeout = None , read_only = False ):
175
185
"""
176
186
Executes a query against the graph.
0 commit comments