getQuery() 공개 메소드

Get the underlying query builder instance.
public getQuery ( ) : Builder
리턴 LMongo\Query\Builder
예제 #1
0
 public function testWithDeletedProperlyRemovesDeletedClause()
 {
     $builder = new LMongo\Eloquent\Builder(new LMongo\Query\Builder(m::mock('LMongo\\Connection')));
     $model = m::mock('LMongo\\Eloquent\\Model');
     $model->shouldReceive('getCollection')->once()->andReturn('');
     $model->shouldReceive('getQualifiedDeletedAtColumn')->once()->andReturn('deleted_at');
     $builder->setModel($model);
     $builder->getQuery()->where('updated_at', null);
     $builder->getQuery()->where('deleted_at', null);
     $builder->getQuery()->where('foo_bar', null);
     $builder->withTrashed();
     $this->assertEquals(2, count($builder->getQuery()->wheres));
 }
예제 #2
0
파일: Relation.php 프로젝트: navruzm/lmongo
 /**
  * Get the base query builder driving the Eloquent builder.
  *
  * @return \LMongo\Query\Builder
  */
 public function getBaseQuery()
 {
     return $this->query->getQuery();
 }