예제 #1
0
파일: create.py 프로젝트: rbeagrie/gffutils
 def _insert(self, feature, cursor):
     """
     Insert a feature into the database.
     """
     try:
         cursor.execute(constants._INSERT, feature.astuple())
     except sqlite3.ProgrammingError:
         cursor.execute(constants._INSERT, feature.astuple(self.default_encoding))
예제 #2
0
파일: create.py 프로젝트: drubin23/gffutils
 def _insert(self, feature, cursor):
     """
     Insert a feature into the database.
     """
     try:
         cursor.execute(constants._INSERT, feature.astuple())
     except sqlite3.ProgrammingError:
         cursor.execute(
             constants._INSERT, feature.astuple(self.default_encoding))
예제 #3
0
 def _replace(self, feature, cursor):
     """
     Insert a feature into the database.
     """
     try:
         cursor.execute(constants._UPDATE,
                        list(feature.astuple()) + [feature.id])
     except sqlite3.ProgrammingError:
         cursor.execute(
             constants._INSERT,
             list(feature.astuple(self.default_encoding)) + [feature.id])
예제 #4
0
 def _replace(self, feature, cursor):
     """
     Insert a feature into the database.
     """
     try:
         cursor.execute(
             constants._UPDATE,
             list(feature.astuple()) + [feature.id])
     except sqlite3.ProgrammingError:
         cursor.execute(
             constants._INSERT,
             list(feature.astuple(self.default_encoding)) + [feature.id])