Пример #1
0
 def statement(self):
     """ The full Cypher statement.
     """
     string = StringIO()
     writer = CypherWriter(string)
     writer.write_literal("CREATE ")
     writer.write_node(self.__node, "a" if self.__return else None,
                       CypherParameter("P") if self.__node.properties else None)
     if self.__return:
         writer.write_literal(" RETURN a")
     return string.getvalue()
Пример #2
0
 def statement(self):
     """ The full Cypher statement.
     """
     string = StringIO()
     writer = CypherWriter(string)
     writer.write_literal("MERGE ")
     if self.__labels or self.__properties or self.__return:
         node_name = "a"
     else:
         node_name = None
     writer.write_node(self.__node, node_name)
     if self.__labels:
         writer.write_literal(" SET a")
         for label in self.__labels:
             writer.write_label(label)
     if self.__properties:
         writer.write_literal(" SET a={P}")
     if self.__return:
         writer.write_literal(" RETURN a")
     return string.getvalue()
Пример #3
0
 def statement(self):
     """ The full Cypher statement.
     """
     string = StringIO()
     writer = CypherWriter(string)
     writer.write_literal("MERGE ")
     if self.__labels or self.__properties or self.__return:
         node_name = "a"
     else:
         node_name = None
     writer.write_node(self.__node, node_name)
     if self.__labels:
         writer.write_literal(" SET a")
         for label in self.__labels:
             writer.write_label(label)
     if self.__properties:
         writer.write_literal(" SET a={P}")
     if self.__return:
         writer.write_literal(" RETURN a")
     return string.getvalue()