Beispiel #1
0
        private static void _DropIndexData(SqlConnection conn, string bingo_schema,
                                           BingoIndexID id, bool throw_if_not_exists)
        {
            BingoIndexData data = _extractIndexData(conn, bingo_schema, id, throw_if_not_exists);

            if (data != null)
            {
                data.DropTables(conn);
                data.DropTriggers(conn);
            }

            BingoSqlUtils.ExecNonQueryNoThrow(conn, "DELETE FROM {0} WHERE obj_id = '{1}'",
                                              _contextTable(bingo_schema), id.table_id);

            for (int i = index_data_list.Count - 1; i >= 0; i--)
            {
                BingoIndexDataRefs refs = (BingoIndexDataRefs)index_data_list[i];
                if (refs.index_data.id.Equals(id))
                {
                    index_data_list.RemoveAt(i);
                    BingoLog.logMessage("Sessions for table {0} have been released", id.InformationName(conn));
                }
            }
            if (data != null)
            {
                BingoLog.logMessage("Bingo index for table {0} has been dropped", id.InformationName(conn));
            }
        }
      private static void _DropIndexData (SqlConnection conn, string bingo_schema, 
         BingoIndexID id, bool throw_if_not_exists)
      {
         BingoIndexData data = _extractIndexData(conn, bingo_schema, id, throw_if_not_exists);
         if (data != null)
         {
            data.DropTables(conn);
            data.DropTriggers(conn);
         }

         BingoSqlUtils.ExecNonQueryNoThrow(conn, "DELETE FROM {0} WHERE obj_id = '{1}'",
            _contextTable(bingo_schema), id.table_id);

         for (int i = index_data_list.Count - 1; i >= 0; i--)
         {
            BingoIndexDataRefs refs = (BingoIndexDataRefs)index_data_list[i];
            if (refs.index_data.id.Equals(id))
            {
               index_data_list.RemoveAt(i);
               BingoLog.logMessage("Sessions for table {0} have been released", id.InformationName(conn));
            }
         }
         if (data != null)
            BingoLog.logMessage("Bingo index for table {0} has been dropped", id.InformationName(conn));
      }