/** * Format the concat statement * * @param Fuel\Database\Connection $connection * @return string concat statement */ public function compileConcat($connection) { $compiler = $connection->getCompiler(); if (method_exists($compiler, $method = 'compileCommand' . ucfirst($this->command))) { return call_user_func(array($compiler, $method), $this->arguments); } $command = strtoupper($this->command); $arguments = empty($this->arguments) ? '' : $connection->quote($this->arguments); return $command . '(' . $arguments . ')'; }
/** * Return the quoted identifier. * * @return mixed expression */ public function getValue(Connection $connection) { $compiler = $connection->getCompiler(); $identifiers = $compiler->compileIdentifiers((array) $this->value); $sql = 'MATCH (' . $identifiers . ') AGAINST ('; $sql .= $connection->quote($this->against); if ($this->boolean) { $sql .= ' IN BOOLEAN MODE'; } elseif ($this->expand) { $sql .= ' WITH QUERY EXPANSION'; } return $sql . ')'; }
/** * Return the expression. * * @return mixed expression */ public function getValue(Connection $connection) { $compiler = $connection->getCompiler(); return $compiler->compileCase($this); }
/** * Return the expression. * * @return mixed expression */ public function getValue(Connection $connection) { $compiler = $connection->getCompiler(); return $compiler->compileIncrement($this->value, $this->amount); }