/// <summary> /// ������ ������ /// </summary> /// <param name="index">������</param> public void CreateIndex(Index index) { ExecuteNonQuery(razor.Parse(TemplateManager.GetCreateIndexTemplate(), index, "create index")); log.Info("������ {0} ������ � ������� {1}", index.Name, index.PartitionName); }
/// <summary> /// ������� ������ /// </summary> /// <param name="index">������</param> public void DropIndex(Index index) { ExecuteNonQuery(razor.Parse(TemplateManager.GetDropIndexTemplate(), index, "drop index")); log.Info("������ {0} ������", index.Name); }
/// <summary> /// Создаёт индекс /// </summary> /// <param name="index">Индеес</param> public void CreateIndex(Index index) { try { strategy.CreateIndex(index); } catch { } }
/// <summary> /// Удаляет индекс /// </summary> /// <param name="index">Индеес</param> public void DropIndex(Index index) { try { strategy.DropIndex(index); } catch { } }
public void AddColumnTest() { var idx = new Index("IDX_TEST", "testTable"); idx.AddColumn(new IndexColumn("Test")); Assert.AreEqual(1, idx.Columns.Count); }
public void AddColumnSameObjectTest() { var idx = new Index("IDX_TEST", "testTable"); var idx2 = idx.AddColumn(new IndexColumn("testcol")); Assert.AreSame(idx, idx2); }
public void AddColumnDublicateTest() { var idx = new Index("IDX_TEST", "testTable"); idx.AddColumn(new IndexColumn("Test")); Assert.Throws<DublicateColumnException>(() => idx.AddColumn(new IndexColumn("Test"))); }