Exemplo n.º 1
0
 def __init__(self, primary_label, primary_key=None, primary_value=None):
     CypherTask.__init__(self)
     self.__node = Node(primary_label)
     if primary_key is not None:
         self.__node.properties[primary_key] = CypherParameter("V", primary_value)
     self.__labels = LabelSet()
     self.__properties = PropertySet()
     self.__return = False
Exemplo n.º 2
0
 def append_rel(i, rel):
     if rel.properties:
         path.append("-[r{0}:`{1}` {{q{0}}}]->".format(i, rel.type))
         params["q{0}".format(i)] = PropertySet(rel.properties)
         values.append("r{0}".format(i))
     else:
         path.append("-[r{0}:`{1}`]->".format(i, rel.type))
         values.append("r{0}".format(i))
Exemplo n.º 3
0
    def properties(self):
        """ The full set of properties to apply to the merged node.

        :rtype: :class:`py2neo.PropertySet`
        """
        p = PropertySet(self.__properties)
        if self.primary_key:
            p[self.primary_key] = self.primary_value
        return p
Exemplo n.º 4
0
 def __init__(self, entity, properties):
     Job.__init__(self, "PUT", Target(entity, "properties"),
                  PropertySet(properties))