code: async def _run_sql(database, operation, *args, **kwargs):
      
      __log__.debug((operation, args, kwargs))
  
      with peewee.__exception_wrapper__:
          cursor = await database.cursor_async()
  
          try:
              await cursor.execute(operation, *args, **kwargs)
          except:
              await cursor.release()
              raise
  
          return cursor
docs: Run SQL operation (query or command) against database.