/**
  * Returns the fragment SQL
  *
  * @param   rdbms.DBConnection conn
  * @return  string
  * @throws  rdbms.SQLStateException
  */
 public function asSql(DBConnection $conn)
 {
     $args = $this->args;
     array_unshift($args, $conn->getFormatter()->dialect->formatFunction($this));
     return call_user_func_array(array($conn, 'prepare'), $args);
 }
Esempio n. 2
0
 /**
  * Returns the fragment SQL
  *
  * @param   rdbms.DBConnection conn
  * @return  string
  * @throws  rdbms.SQLStateException
  */
 public function asSql(DBConnection $conn)
 {
     return $conn->prepare($conn->getFormatter()->dialect->formatFunction($this), ...$this->args);
 }