Commits

March Liu committed bb01978

predicate expression support when filter pair

  • Participants
  • Parent commits 0824f51

Comments (0)

Files changed (1)

File src/socrates/core.py

             self.Session.execute(table.delete().where(table.c.subject_id==subject_id))
         self.Session.commit()
 
-    def filterSegmentsByPair(self, predicate_segment, obj):
+    def filterSegmentsByPair(self, prdExpr, obj):
         """
 >>> storage = Storage("sqlite://", create=True)
 >>> pid = storage.newPredicate('ssoid', 'string')
 >>> print len(segments)
 1
         """
-        pname, tnames = self.parsePredicateExpression(predicate_segment)
+        pname, tnames = self.parsePredicateExpression(prdExpr)
         pid = self.get_predicate_id_by_name(pname)
         for tname in tnames:
             SegmentType = self.registed_type[tnames[0]]