Esempio n. 1
0
 public void ColumnConstructorTest()
 {
     Table table = null; // TODO: Initialize to an appropriate value
     string name = string.Empty; // TODO: Initialize to an appropriate value
     string alias = string.Empty; // TODO: Initialize to an appropriate value
     Column target = new Column(table, name, alias);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Esempio n. 2
0
 public void AscTest()
 {
     string name = string.Empty; // TODO: Initialize to an appropriate value
     Column target = new Column(name); // TODO: Initialize to an appropriate value
     OrderByExpression expected = null; // TODO: Initialize to an appropriate value
     OrderByExpression actual;
     actual = target.Asc();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Esempio n. 3
0
        public void TestSqlTableExpression()
        {
            var op1 = new Column("col1");
            var op2 = new Column(Table.Default("tab1"), "col1");

            AssertExpression(op1, "col1");
            AssertExpression(op2, "tab1.col1");
        }
Esempio n. 4
0
 public ScalarSelect ScalarSelect(Top top, Column selectedItem)
 {
     return new Select.ScalarSelect(top, selectedItem, From, this);
 }
Esempio n. 5
0
 public ScalarSelect ScalarSelect(Column selectedItem)
 {
     return new Select.ScalarSelect(null, selectedItem, From, this);
 }
Esempio n. 6
0
 private void GenerateColumnExpression(Column expression, TextWriter writer, CodeGeneratorOptions options)
 {
     if (expression.Table == null)
     {
         writer.Write(string.Concat(!string.IsNullOrEmpty(expression.Alias) ? expression.Alias : expression.Name));
     }
     else
     {
         if (!string.IsNullOrEmpty(expression.Table.Alias))
         {
             writer.Write(string.Concat(expression.Table.Alias, ".", !string.IsNullOrEmpty(expression.Alias) ? expression.Alias : expression.Name));
         }
         else
         {
             if (!string.IsNullOrEmpty(expression.Table.Name))
             {
                 writer.Write(string.Concat(expression.Table.Name, ".", !string.IsNullOrEmpty(expression.Alias) ? expression.Alias : expression.Name));
             }
             else
             {
                 writer.Write(string.Concat(!string.IsNullOrEmpty(expression.Alias) ? expression.Alias : expression.Name));
             }
         }
     }
 }
Esempio n. 7
0
 public void InTest()
 {
     string name = string.Empty; // TODO: Initialize to an appropriate value
     Column target = new Column(name); // TODO: Initialize to an appropriate value
     string[] values = null; // TODO: Initialize to an appropriate value
     Predicate expected = null; // TODO: Initialize to an appropriate value
     Predicate actual;
     actual = target.In(values);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Esempio n. 8
0
 public void ColumnConstructorTest3()
 {
     string name = string.Empty; // TODO: Initialize to an appropriate value
     Column target = new Column(name);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Esempio n. 9
0
 public Select(Column[] selectItem, From.From from, OrderBy.OrderBy orderBy)
 {
     List<Expression> list = new List<Expression>();
     foreach (var c in selectItem)
     {
         this.SelectList.Add(c);
     }
     From = from;
     OrderBy = orderBy;
 }
Esempio n. 10
0
 public Select(Column[] selectedItems, From.From from, Where.Where where)
 {
     foreach (var column in selectedItems)
     {
         if (this.SelectList == null) this.SelectList = new List<Expression>();
         this.SelectList.Add(column);
     }
     this.From = from;
     this.Where = where;
 }
Esempio n. 11
0
 public void SelectTest1()
 {
     var table = new Table("test");
     var orderByExpression = table["foo"].Asc();
     OrderBy.OrderBy target = new OrderBy.OrderBy(orderByExpression);
     Column[] selectedItems = new Column[] { table["foo"] };
     From.From from = new From.From(table);
     Select.Select expected = new Select.Select(selectedItems, from, target);
     Select.Select actual;
     actual = target.Select(selectedItems);
     Assert.AreEqual(target, actual.OrderBy);
 }