/**
  * 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]);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 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();
 }