count() 공개 정적인 메소드

public static count ( )
예제 #1
0
 /**
  * @test
  */
 public function shouldCreateSelectCountQuery()
 {
     // when
     $query = Query::count();
     // then
     $this->assertEquals(QueryType::$COUNT, $query->type);
 }
예제 #2
0
 /**
  * @test
  */
 public function shouldIgnoreOrderLimitAndOffsetForSelectCount()
 {
     // given
     $query = Query::count()->table('products')->order('name desc')->limit(1)->offset(10);
     // when
     $sql = $this->dialect->buildQuery($query);
     // then
     $this->assertEquals('SELECT count(*) FROM products', $sql);
 }