Azavea.Open.DAO.SQL.SqlConnectionUtilities.DropIndex C# (CSharp) Method

DropIndex() public static method

Drops the specified index.
public static DropIndex ( AbstractSqlConnectionDescriptor connDesc, string indexName ) : bool
connDesc AbstractSqlConnectionDescriptor The database connection descriptor. This is used both as /// a key for caching connections/commands as well as for /// getting the actual database connection the first time.
indexName string The name of the index to remove.
return bool
        public static bool DropIndex(AbstractSqlConnectionDescriptor connDesc, string indexName)
        {
            bool retVal = false;
            try
            {
                string sql = "DROP INDEX " + indexName;
                XSafeCommand(connDesc, sql, null);
                retVal = true;
            }
            catch (Exception e)
            {
                _log.Warn("Unable to drop index '" + indexName + "'.", e);
            }
            return retVal;
        }