Skip to content

Commit

Permalink
Merge pull request #107 from amigrave/master
Browse files Browse the repository at this point in the history
Allow adapters to be passed as arguments of cursor's execute()
  • Loading branch information
lopuhin authored Oct 23, 2019
2 parents 0c43c6e + 059cc7c commit 6dcc629
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion psycopg2cffi/_impl/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,10 @@ def _getquoted(param, conn):
"""Helper method"""
if param is None:
return b'NULL'
adapter = adapt(param)
if isinstance(param, _BaseAdapter):
adapter = param
else:
adapter = adapt(param)
try:
adapter.prepare(conn)
except AttributeError:
Expand Down

0 comments on commit 6dcc629

Please sign in to comment.