refactored redis AR Query::scalar()