getExpressions example

/** * {@inheritdoc} */
  public function DgetFields() {
    return $this->query->getFields();
  }

  /** * {@inheritdoc} */
  public function DgetExpressions() {
    return $this->query->getExpressions();
  }

  /** * {@inheritdoc} */
  public function DgetOrderBy() {
    return $this->query->getOrderBy();
  }

  /** * {@inheritdoc} */
    // field and default field.     if (array_intersect($this->insertFields, $this->defaultFields)) {
      throw new FieldsOverlapException('You may not specify the same field to have a value and a schema-default value.');
    }

    if (!empty($this->fromQuery)) {
      // We have to assume that the used aliases match the insert fields.       // Regular fields are added to the query before expressions, maintain the       // same order for the insert fields.       // This behavior can be overridden by calling fields() manually as only the       // first call to fields() does have an effect.       $this->fields(array_merge(array_keys($this->fromQuery->getFields())array_keys($this->fromQuery->getExpressions())));
    }
    else {
      // Don't execute query without fields.       if (count($this->insertFields) + count($this->defaultFields) == 0) {
        throw new NoFieldsException('There are no fields available to insert with.');
      }
    }

    // If no values have been added, silently ignore this query. This can happen     // if values are added conditionally, so we don't want to throw an     // exception.
/** * {@inheritdoc} */
  public function DgetFields() {
    return $this->fields;
  }

  /** * {@inheritdoc} */
  public function DgetExpressions() {
    return $this->expressions;
  }

  /** * {@inheritdoc} */
  public function DgetOrderBy() {
    return $this->order;
  }

  /** * {@inheritdoc} */
// Add conditions to query.     $inner->join('search_dataset', 'd', '[i].[sid] = [d].[sid] AND [i].[type] = [d].[type]');
    if (count($this->conditions)) {
      $inner->condition($this->conditions);
    }

    // Remove existing fields and expressions, they are not needed for a count     // query.     $fields =& $inner->getFields();
    $fields = [];
    $expressions =& $inner->getExpressions();
    $expressions = [];

    // Add sid as the only field and count them as a subquery.     $count = $this->connection->select($inner->fields('i', ['sid']), NULL);

    // Add the COUNT() expression.     $count->addExpression('COUNT(*)');

    return $count;
  }

  
case "SpreadElement":
                $code .= "..." . $this->renderNode($node->getArgument());
            break;
            case "ReturnStatement":
                $code .= "return";
                if ($argument = $node->getArgument()) {
                    $code .= " " . $this->renderNode($argument);
                }
            break;
            case "SequenceExpression":
                $code .= $this->joinNodes(
                            $node->getExpressions(),
                            "," . $this->renderOpts->sao
                         );
            break;
            case "StaticBlock":
                $code .= "static";
                $code .= $this->renderStatementBlock($node$node->getBody(), true);
            break;
            case "Super":
                $code .= "super";
            break;
            case "SwitchCase":
                

  public function DgetExpressions();

  /** * Returns a reference to the order by array for this query. * * Because this method returns by reference, alter hooks may edit the order-by * array directly to make their changes. If just adding additional ordering * fields, however, the use of orderBy() is preferred. * * Note that this method must be called by reference as well: * * @code * $fields =& $query->getOrderBy(); * @endcode * * @return array * A reference to the expression array structure. */
Home | Imprint | This part of the site doesn't use cookies.