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