| @@ 65-73 (lines=9) @@ | ||
| 62 | * |
|
| 63 | * @return Expression |
|
| 64 | */ |
|
| 65 | public function whereEmpty($field) |
|
| 66 | { |
|
| 67 | return $this->where( |
|
| 68 | '$or', |
|
| 69 | array( |
|
| 70 | array($field => null), |
|
| 71 | array($field => ''), |
|
| 72 | array($field => array()), |
|
| 73 | array($field => array('$exists' => false)) |
|
| 74 | ) |
|
| 75 | ); |
|
| 76 | } |
|
| @@ 78-86 (lines=9) @@ | ||
| 75 | ); |
|
| 76 | } |
|
| 77 | ||
| 78 | public function whereNotEmpty($field) |
|
| 79 | { |
|
| 80 | return $this->where('$nor', array( |
|
| 81 | array($field => null), |
|
| 82 | array($field => ''), |
|
| 83 | array($field => array()), |
|
| 84 | array($field => array('$exists' => false)) |
|
| 85 | )); |
|
| 86 | } |
|
| 87 | ||
| 88 | public function whereGreater($field, $value) |
|
| 89 | { |
|