public function createPrimaryIndex($bucketName, $indexName = null, $options = [])
    {
        $bucketName = $this->db->quoteBucketName($bucketName);

        if ($indexName) {
            $indexName  = $this->db->quoteBucketName($indexName);
        }

        $sql = "CREATE PRIMARY INDEX $indexName ON $bucketName";

        if (!empty($options)) {
            $sql .= ' WITH ' . Json::encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT);
        }

        return $sql;
    }