File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,21 @@ def test_psycopg2_with_named_parameterized_query():
214214 finally :
215215 conn .close ()
216216
217+ def test_psycopg2_with_named_parameterized_cypher_query ():
218+ """Check if the driver correctly handles parameterized named queries"""
219+ params = get_connection_params (arcadedb )
220+ conn = psycopg .connect (** params )
221+ conn .autocommit = True
222+
223+ try :
224+ with conn .cursor () as cursor :
225+ query_params = {'name' : 'Stout' }
226+ cursor .execute ('{cypher} MATCH (b:Beer) WHERE b.name =%(name)s RETURN b' , query_params )
227+ beer = cursor .fetchall ()[0 ]
228+ assert 'Stout' in beer
229+ finally :
230+ conn .close ()
231+
217232
218233def test_psycopg2_with_positional_parameterized_query ():
219234 """Check if the driver correctly handles parameterized positional queries"""
You can’t perform that action at this time.
0 commit comments