コード例 #1
0
 /**
  * Counts statements.
  * @param Builder $builder
  * @param IndexOptions $opts
  * @return Int Number of statements in Builder.
  */
 public function count(Builder $builder, IndexOptions $opts)
 {
     return $builder->count(['lrs_id' => 1], ['lrs_id' => 1, 'active' => -1, 'voided' => 1]);
 }
コード例 #2
0
ファイル: Repository.php プロジェクト: renatogcarvalho/feeder
 /**
  * Find a record by an attribute
  *
  * @param string $attribute
  * @param mixed  $value
  * @param array  $columns
  * @return \Jenssegers\Mongodb\Model
  */
 public function findBy($attribute, $value, $columns = ['*'])
 {
     $this->applyCriteria();
     return $this->builder->where($attribute, '=', $value)->first($columns);
 }
コード例 #3
0
 /**
  * Counts statements.
  * @param Builder $builder
  * @param IndexOptions $opts
  * @return Int Number of statements in Builder.
  */
 public function count(Builder $builder, IndexOptions $opts)
 {
     return $builder->count();
 }