public function visitIndex(O\IndexExpression $expression) { $this->walk($expression->getValue()); $this->walk($expression->getIndex()); $this->addTypeOperation($expression, $this->analysis[$expression->getValue()]->getIndex($expression)); }
protected function visitIndex(O\IndexExpression $expression) { $valueExpression = $expression->getValue(); if (!$valueExpression instanceof O\VariableExpression || !$valueExpression->getName() instanceof O\ValueExpression) { throw new PinqDemoSqlException('Variable indexer is not supported'); } $index = $expression->getIndex()->getValue(); $this->sql .= $this->query->tableName . '.' . $index; }