Skip to content

Commit

Permalink
Remove usage of cursor in DuckDB
Browse files Browse the repository at this point in the history
  • Loading branch information
maver1ck authored Sep 25, 2024
1 parent a2762a7 commit e5703a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aiosql/adapters/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ def __init__(self, *args, cursor_as_dict: bool = False, **kwargs):
# whether to converts the default tuple response to a dict.
self._convert_row_to_dict = cursor_as_dict

def _cursor(self, conn):
"""Get a cursor from a connection."""
# For DuckDB cursor is duplicated connection so we don't want to use it
return conn

def process_sql(self, query_name, op_type, sql):
return VAR_REF.sub(_colon_to_dollar, sql)

Expand Down

0 comments on commit e5703a7

Please sign in to comment.