Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct(self::DB_TYPE, 'applications');
     // Create necessary indices.
     mongo_ok(self::$collection->createIndex(array('jobid' => 1)));
     mongo_ok(self::$collection->createIndex(array('jobid' => 1, 'submitted' => 1)));
     mongo_ok(self::$collection->createIndex(array('jobid' => 1, 'status' => 1)));
     mongo_ok(self::$collection->createIndex(array('jobid' => 1, 'status' => 1, 'submitted' => 1)));
     mongo_ok(self::$collection->createIndex(array('jobid' => 1, 'studentid' => 1)));
     mongo_ok(self::$collection->createIndex(array('studentid' => 1)));
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     parent::__construct(self::DB_TYPE, 'geocodes');
     // Create necessary indices.
     mongo_ok(self::$collection->createIndex(array('location' => 1)));
 }
Ejemplo n.º 3
0
 public function __destruct()
 {
     // We drop any testing collections.
     if (self::$test) {
         if (isset(static::$collection)) {
             if (endsWith(static::$collection->getName(), '_test')) {
                 mongo_ok(static::$collection->drop());
             }
         }
     }
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     parent::__construct(self::DB_TYPE, 'questions');
     // Create necessary indices.
     mongo_ok(self::$collection->createIndex(array('text' => 'text')));
 }