public function primaryIndex($name = null, $ignoreIfExist = false, $defer = false)
    {
        $this->connection->openBucket($this->getTable())
            ->manager()->createN1qlPrimaryIndex(
                $this->detectIndexName($name),
                $ignoreIfExist,
                $defer
            );
    }
public function primaryIndex($name = null, $ignoreIfExist = false, $defer = false)
    {
        $this->connection->openBucket($this->getTable())
            ->manager()->createN1qlPrimaryIndex(
                $this->detectIndexName($name),
                $ignoreIfExist,
                $defer
            );
    }
public function primaryIndex ( $ name = null , $ ignoreIfExist = false , $ defer = false ) { $ this -> connection -> openBucket ( $ this -> getTable ( ) ) -> manager ( ) -> createN1qlPrimaryIndex ( $ this -> detectIndexName ( $ name ) , $ ignoreIfExist , $ defer ) ; }
Specify the primary index for the current bucket.

@param string|null $name
@param boolean     $ignoreIfExist  if a primary index already exists, an exception will be thrown unless this is
set to true.
@param boolean     $defer          true to defer building of the index until buildN1qlDeferredIndexes()}is
called (or a direct call to the corresponding query service API).
Specify the primary index for the current bucket .