Exemplo n.º 1
0
        public void RenderExpressionSelectClauses()
        {
            Column        column1       = new Column("Column1");
            Column        column2       = new Column("Column2");
            SelectClause  selectClause1 = new SelectClause(column1);
            SelectClause  selectClause2 = new SelectClause(column2);
            SelectClauses selectClauses = new SelectClauses(selectClause1, selectClause2);

            Assert.AreEqual("[Column1], [Column2]", sqlClientRenderer.Render(selectClauses));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds the specified property to the event filter.
        /// </summary>
        public void AddSelectClause(NodeId eventTypeId, QualifiedName propertyName)
        {
            SimpleAttributeOperand clause = new SimpleAttributeOperand();

            clause.TypeDefinitionId = eventTypeId;
            clause.AttributeId      = Attributes.Value;

            clause.BrowsePath.Add(propertyName);

            SelectClauses.Add(clause);
        }
Exemplo n.º 3
0
        public void CreateExpressionSelectClauses()
        {
            Column        column1       = new Column("Column1");
            Column        column2       = new Column("Column2");
            SelectClause  selectClause1 = new SelectClause(column1);
            SelectClause  selectClause2 = new SelectClause(column2);
            SelectClauses selectClauses = new SelectClauses(selectClause1, selectClause2);

            Assert.AreEqual(selectClause1, selectClauses.LeftClause);
            Assert.AreEqual(selectClause2, selectClauses.RightClause);
        }
Exemplo n.º 4
0
 public SQLClause(SelectClauses _select,
                  object _from,
                  JoinClauses _join,
                  WhereClauses _where,
                  OrderByClauses _orderby)
 {
     this._select  = _select;
     this._from    = _from;
     this._join    = _join;
     this._where   = _where;
     this._orderby = _orderby;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Adds the specified browse path to the event filter.
        /// </summary>
        public void AddSelectClause(NodeId eventTypeId, string browsePath, uint attributeId)
        {
            SimpleAttributeOperand clause = new SimpleAttributeOperand();

            clause.TypeDefinitionId = eventTypeId;
            clause.AttributeId      = attributeId;

            if (!String.IsNullOrEmpty(browsePath))
            {
                clause.BrowsePath = SimpleAttributeOperand.Parse(browsePath);
            }

            SelectClauses.Add(clause);
        }
Exemplo n.º 6
0
 public override string Render(SelectClauses selectClauses)
 {
     if (selectClauses.LeftClause == null)
     {
         return(selectClauses.RightClause.Render(this));
     }
     else if (selectClauses.RightClause == null)
     {
         return(selectClauses.LeftClause.Render(this));
     }
     else
     {
         return(string.Format("{0}, {1}", selectClauses.LeftClause.Render(this), selectClauses.RightClause.Render(this)));
     }
 }
Exemplo n.º 7
0
 public abstract string Render(SelectClauses selectClauses);