public function getQueryString($buildDepth=BuildDepth::SINGLE, $orderby=null) {
    $selectStmt = $this->buildQuery($buildDepth, $orderby);
    $str = $selectStmt->__toString();
    $mapper = self::getMapper($selectStmt->getType());
    foreach ($selectStmt->getParameters() as $key => $value) {
      $value = is_string($value) ? $mapper->quoteValue($value) : $value;
      $str = preg_replace('/'.$key.'/', $value, $str, 1);
    }
    return $str;
  }