async def scalar(self, query, *multiparams, **params):
        """Executes a SQL query and returns a scalar value."""
        res = await self.execute(query, *multiparams, **params)
        return (await res.scalar())
async def scalar ( self , query , * multiparams , ** params ) : res = await self . execute ( query , * multiparams , ** params ) return ( await res . scalar ( ) )
Executes a SQL query and returns a scalar value.