Skip to content

Commit

Permalink
attempt at cumulating pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Coelho authored and zx80 committed Jan 18, 2024
1 parent 154d4c7 commit bc2c54e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions aiosql/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,25 @@ def fn(self: Queries, conn, *args, **kwargs): # pragma: no cover

elif operation_type == SQLOperationType.INSERT_UPDATE_DELETE:

def fn(self: Queries, conn, *args, **kwargs): # type: ignore
# pragma: no cover
def fn(self: Queries, conn, *args, **kwargs): # type: ignore # pragma: no cover
return self.driver_adapter.insert_update_delete(
conn, query_name, sql, _params(args, kwargs)
)

elif operation_type == SQLOperationType.INSERT_UPDATE_DELETE_MANY:

def fn(self: Queries, conn, *args, **kwargs): # type: ignore
# pragma: no cover
def fn(self: Queries, conn, *args, **kwargs): # type: ignore # pragma: no cover
assert not kwargs # help type checker
return self.driver_adapter.insert_update_delete_many(conn, query_name, sql, *args)

elif operation_type == SQLOperationType.SCRIPT:

def fn(self: Queries, conn, *args, **kwargs): # type: ignore
# pragma: no cover
def fn(self: Queries, conn, *args, **kwargs): # type: ignore # pragma: no cover
return self.driver_adapter.execute_script(conn, sql)

elif operation_type == SQLOperationType.SELECT:

def fn(self: Queries, conn, *args, **kwargs): # type: ignore
# pragma: no cover
def fn(self: Queries, conn, *args, **kwargs): # type: ignore # pragma: no cover
return self.driver_adapter.select(
conn, query_name, sql, _params(args, kwargs), record_class
)
Expand Down

0 comments on commit bc2c54e

Please sign in to comment.