Exemple #1
0
    def remove_vertex(self, index_name, _id, key=None, value=None):
        """
        Removes a vertex from the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Optional. Name of the key.
        :type key: str

        :param value: Optional. Value of the key.
        :type value: str        

        :rtype: Neo4jResponse

        """
        key, value = quote(key), quote(value)
        path = build_path(index_path, "node", index_name, key, value, _id)
        params = None
        return self.request.delete(path, params)
Exemple #2
0
    def lookup_edge(self, index_name, key, value):
        """
        Looks up an edge in the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :rtype: Neo4jResponse

        """
        key, value = quote(key), quote(value)
        path = build_path(index_path, edge_path, index_name, key, value)
        params = None
        return self.request.get(path, params)
Exemple #3
0
    def lookup_vertex(self, index_name, key, value):
        """
        Returns the vertices indexed with the key and value.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :rtype: Neo4jResponse

        """
        key, value = quote(key), quote(value)
        path = build_path(index_path, "node", index_name, key, value)
        params = None
        return self.request.get(path, params)
Exemple #4
0
    def lookup_edge(self, index_name, key, value):
        """
        Looks up an edge in the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :rtype: Neo4jResponse

        """
        # converting all values to strings because that's how they're stored
        key, value = quote(key), quote(str(value))
        path = build_path(index_path, edge_path, index_name, key, value)
        params = None
        return self.request.get(path, params)
Exemple #5
0
    def lookup_vertex(self, index_name, key, value):
        """
        Returns the vertices indexed with the key and value.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :rtype: Neo4jResponse

        """
        # converting all values to strings because that's how they're stored
        key, value = quote(key), quote(str(value))
        path = build_path(index_path, "node", index_name, key, value)
        params = None
        return self.request.get(path, params)