Implement query stream object.