Exemple #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);
 }
Exemple #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);
 }
 /// <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
     {
     }
 }
Exemple #5
0
 public void AddColumnTest()
 {
     var idx = new Index("IDX_TEST", "testTable");
     idx.AddColumn(new IndexColumn("Test"));
     Assert.AreEqual(1, idx.Columns.Count);
 }
Exemple #6
0
 public void AddColumnSameObjectTest()
 {
     var idx = new Index("IDX_TEST", "testTable");
     var idx2 = idx.AddColumn(new IndexColumn("testcol"));
     Assert.AreSame(idx, idx2);
 }
Exemple #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")));
 }