code: def _replace(self, feature, cursor):
          
          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])
docs: Insert a feature into the database.