public function testAssemble()
 {
     $selector = new MinSelectExpression();
     $selector->setField('fieldname');
     $this->assertEquals('MIN(fieldname)', QueryAssembler::stringify($selector));
     $selector->setAlias('mn');
     $this->assertEquals('MIN(fieldname) AS mn', QueryAssembler::stringify($selector));
 }
Beispiel #2
0
 public function min($property = 'id')
 {
     return $this->_getAggregate(__FUNCTION__, MinSelectExpression::create($property));
 }