/** * Creates a new instance of this command setting the index to insert into, * the key of the new entry and its value, which is a RID. * * @param string $indexName * @param string $key * @param string $rid */ public function __construct($indexName, $key, $rid) { parent::__construct(); $this->setToken('Name', $indexName); $this->setToken('Key', $key); $this->setToken('Value', $rid); }
/** * Creates a new statements to manage indexes on the $property of the given * $class. * * @param string $property * @param string $class */ public function __construct($property, $class = null) { parent::__construct(); if ($class) { $this->setToken('IndexClass', $class); } $this->setToken('Property', $property); }
public function __construct($indexName, $key, $rid = null, TokenFormatter $ridFormatter = null) { parent::__construct(); $ridFormatter = $ridFormatter ?: new EmbeddedRidFormatter(); $this->setToken('Name', $indexName); if (!is_null($key)) { $this->where("key = ?", $key); } if ($rid) { $rid = $ridFormatter::format(array($rid)); $method = $key ? 'andWhere' : 'where'; $this->{$method}("rid = {$rid}"); } }
/** * Builds a new statement, setting the $index to lookup. * * @param string $index */ public function __construct($index) { parent::__construct(); $this->setToken('Index', $index); }
/** * Sets the $property to index. * Optionally, you can specify the property $class and the $type of the * index. * * @param string $property * @param string $class * @param string $type */ public function __construct($indexName) { parent::__construct(); $this->setToken('Name', $indexName); }