def sql(func):
    """wrapper for sql methods

    returns an awaitable asyncio.Future
    """
    def wrapper(self: 'SqlDB', *args, **kwargs):
        assert threading.current_thread() != self.sql_thread
        f = self.asyncio_loop.create_future()
        self.db_requests.put((f, func, args, kwargs))
        return f
    return wrapper
wrapper for sql methods

    returns an awaitable asyncio.Future
    
electrum/sql_db.py