def delete ( self, cursor ):
    """Delete the annotation from the database"""

    sql = "DELETE FROM %s WHERE annoid = %s;"\
            % ( anno_dbtables['annotation'], self.annid ) 

    sql += "DELETE FROM %s WHERE annoid = %s" % ( anno_dbtables['kvpairs'], self.annid )

    try:
      cursor.execute ( sql )
    except MySQLdb.Error, e:
      logger.warning ( "Error deleting annotation %d: %s. sql=%s" % (e.args[0], e.args[1], sql))
      raise OCPCAError ( "Error deleting annotation: %d: %s. sql=%s" % (e.args[0], e.args[1], sql))
dataset/ETHPy150Open neurodata/ndstore/ocpca/batchAnnotation.py/BatchAnnotation.delete/original