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