Exemplo n.º 1
0
 public ElasticClient Update(IndexName iname)
 {
     EsNode   = new Uri("http://localhost:9200/");
     EsConfig = new ConnectionSettings(EsNode).DefaultIndex(iname.ToString());
     EsClient = new ElasticClient(EsConfig);
     return(EsClient);
 }
Exemplo n.º 2
0
        public void ShouldReturnIndexConstraintName()
        {
            var schemaName = "schemaName";
            var tableName  = "tableName";

            string[] columnName = new string[] { "column1", "column2" };

            var cons = new IndexName(schemaName, tableName, columnName, false);
            var expectedConstraintString = "IX_schemaName_tableName_column1_column2";

            Assert.AreEqual(expectedConstraintString, cons.ToString());
        }
Exemplo n.º 3
0
        public void ShouldReturnUniqueIndexConstraintNameInDboSchema()
        {
            var schemaName = "dbo";
            var tableName  = "tableName";

            string[] columnName = new string[] { "column1", "column2" };

            var cons = new IndexName(schemaName, tableName, columnName, true);
            var expectedConstraintString = "UIX_tableName_column1_column2";

            Assert.AreEqual(expectedConstraintString, cons.ToString());
        }