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))); }
public function __construct() { parent::__construct(self::DB_TYPE, 'geocodes'); // Create necessary indices. mongo_ok(self::$collection->createIndex(array('location' => 1))); }
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()); } } } }
public function __construct() { parent::__construct(self::DB_TYPE, 'questions'); // Create necessary indices. mongo_ok(self::$collection->createIndex(array('text' => 'text'))); }