public function testAssemble()
 {
     $selector = new MaxSelectExpression();
     $selector->setField('fieldname');
     $this->assertEquals('MAX(fieldname)', QueryAssembler::stringify($selector));
     $selector->setAlias('mx');
     $this->assertEquals('MAX(fieldname) AS mx', QueryAssembler::stringify($selector));
 }
Example #2
0
 public function max($property = 'id')
 {
     return $this->_getAggregate(__FUNCTION__, MaxSelectExpression::create($property));
 }