/** * get a function format string * * @param SQLFunction func * @return string * @throws lang.IllegalArgumentException */ public function formatFunction(SQLFunction $func) { if ('concat' == $func->func) { return '(' . implode(' + ', array_fill(0, sizeof($func->args), '%s')) . ')'; } return parent::formatFunction($func); }
/** * Get a dialect specific datepart * * @param string datepart * @return string * @throws lang.IllegalArgumentException */ public function datepart($datepart) { $datepart = strtolower($datepart); if (!array_key_exists($datepart, self::$dateparts)) { return parent::datepart($datepart); } if (FALSE === self::$dateparts[$datepart]) { throw new IllegalArgumentException('SqlSrv does not support datepart ' . $datepart); } return self::$dateparts[$datepart]; }