Implement name query.