async def scalar ( self , query , as_tuple = False ) : query = self . _swap_database ( query ) return ( await scalar ( query , as_tuple = as_tuple ) )
python mysql get scalar value from query
Get single value from select () query i . e . for aggregation .
async def scalar(self, query, as_tuple=False):
        """Get single value from ``select()`` query, i.e. for aggregation.

        :return: result is the same as after sync ``query.scalar()`` call
        """
        query = self._swap_database(query)
        return (await scalar(query, as_tuple=as_tuple))