Commits

March Liu committed 545645b

debug

  • Participants
  • Parent commits 658d463

Comments (0)

Files changed (1)

File src/socrates/core.py

         """
         SegmentString = self.registed_type['string']
         SegmentSubject = self.registed_type['subject']
-        session=self.Session()
+        session=self.session
         re = session.query(SegmentSubject.subject_id,).\
             filter(SegmentSubject.predicate_id==meta.IS).\
             filter(SegmentSubject.obj==meta.PREDICATE).\
             filter(select([SegmentString.obj], 
                           and_(SegmentString.subject_id==SegmentSubject.subject_id,
                                SegmentString.predicate_id==meta.NAME)).as_scalar()==name).scalar()
-        session.close()
         return re
 
     def __make_type_helper(self, typename, table):