コード例 #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
ファイル: create.py プロジェクト: DHatziioanou/gffutils
 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])