Ejemplo n.º 1
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Table.Accept(visitor);
            On.Accept(visitor);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            From?.Accept(visitor);
            Where?.Accept(visitor);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Table.Accept(visitor);
            On.Accept(visitor);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Column.Accept(visitor);
            SortOrder.Accept(visitor);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
 /// methods for this object.
 /// </summary>
 /// <param name="visitor">
 /// The <see cref="ISqlVisitor" /> to visit this object with.
 /// </param>
 public override void Accept(ISqlVisitor visitor)
 {
     base.Accept(visitor);
     Column.Accept(visitor);
     visitor.Visit(SqlBinaryOperator.Equal);
     Value.Accept(visitor);
 }
Ejemplo n.º 6
0
        protected override string GenerateSql(SqlStatement statement)
        {
            ISqlVisitor visitor = GetVisitor();

            statement.Accept(visitor);
            return(visitor.Sql);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            From?.Accept(visitor);
            Where?.Accept(visitor);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="source">
        /// The collection of <see cref="SqlSort"/> expressions on which to accept the visitor.
        /// </param>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public static void Accept(this IEnumerable<SqlSort> source, ISqlVisitor visitor)
        {
            if (source == null) throw new ArgumentNullException(nameof(source));
            if (visitor == null) throw new ArgumentNullException(nameof(visitor));

            visitor.Visit(source);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            _columns.Accept(visitor);
            Having?.Accept(visitor);
        }
Ejemplo n.º 10
0
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     foreach(SqlSelectListItem sqlSelectListItem in this.sqlSelectListItems)
         sqlSelectListItem.Accept(visitor);
     visitor.Visited(this);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
 /// methods for this object.
 /// </summary>
 /// <param name="visitor">
 /// The <see cref="ISqlVisitor" /> to visit this object with.
 /// </param>
 public virtual void Accept(ISqlVisitor visitor)
 {
     if (visitor == null)
     {
         throw new ArgumentNullException(nameof(visitor));
     }
     visitor.Visit(this);
 }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     this.leftExpression.Accept(visitor);
     this.sqlCompareOperator.Accept(visitor);
     this.rightExpression.Accept(visitor);
     visitor.Visited(this);
 }
Ejemplo n.º 13
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Into?.Accept(visitor);
            Columns?.Accept(visitor);
            Values.Accept(visitor);
        }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     this.SqlDeleteClause.Accept(visitor) ;
     this.SqlFromClause.Accept(visitor);
     this.SqlWhereClause.Accept(visitor);
     visitor.Visited(this);
 }
Ejemplo n.º 15
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Into?.Accept(visitor);
            Columns?.Accept(visitor);
            Values.Accept(visitor);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Table.Accept(visitor);
            Set.Accept(visitor);
            Where?.Accept(visitor);
        }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     if (this.sqlColumnAlias != null)
         this.sqlColumnAlias.Accept(visitor) ;
     else if (this.sqlExpressionAlias != null)
         this.sqlExpressionAlias.Accept(visitor) ;
     visitor.Visited(this);
 }
Ejemplo n.º 18
0
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     if (this.sqlSearchCondition != null)
         this.sqlSearchCondition.Accept(visitor);
     if (this.sqlOldOuterJoin != null)
         this.sqlOldOuterJoin.Accept(visitor);
     visitor.Visited(this);
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            Select.Accept(visitor);
            From.Accept(visitor);
            Where?.Accept(visitor);
            GroupBy?.Accept(visitor);
            OrderBy.IfAny(orderBy => OrderBy.Accept(visitor));
            Limit?.Accept(visitor);
        }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     this.SqlSelectClause.Accept(visitor);
     this.SqlIntoClause.Accept(visitor);
     this.SqlFromClause.Accept(visitor);
     this.SqlWhereClause.Accept(visitor);
     this.SqlOrderByClause.Accept(visitor);
     this.SqlHavingClause.Accept(visitor);
     this.SqlGroupByClause.Accept(visitor);
     visitor.Visited(this);
 }
Ejemplo n.º 21
0
        public override void Accept(ISqlVisitor visitor)
        {
            visitor.Visiting(this);
            if (this.sqlPredicate != null)
            {
                this.sqlPredicate.Accept(visitor);
            }
            if (this.subSqlSearchCondition != null)
            {
                this.subSqlSearchCondition.Accept(visitor);
            }

            visitor.Visited(this);

            //obs!! we have to do it this way to get right order !!
            if (this.nextSqlSearchCondition != null)
            {
                this.nextSqlSearchCondition.Accept(visitor);
            }
        }
Ejemplo n.º 22
0
 public abstract void Accept(ISqlVisitor visitor);
Ejemplo n.º 23
0
 /// <summary>
 /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
 /// methods for this object.
 /// </summary>
 /// <param name="visitor">
 /// The <see cref="ISqlVisitor" /> to visit this object with.
 /// </param>
 public virtual void Accept(ISqlVisitor visitor)
 {
     if (visitor == null) throw new ArgumentNullException(nameof(visitor));
     visitor.Visit(this);
 }
        public override void Accept(ISqlVisitor visitor)
        {
            visitor.Visiting(this);
            if (this.sqlPredicate != null)
                this.sqlPredicate.Accept(visitor);
            if (this.subSqlSearchCondition != null)
                this.subSqlSearchCondition.Accept(visitor);

            visitor.Visited(this);

            //obs!! we have to do it this way to get right order !!
            if (this.nextSqlSearchCondition != null)
                this.nextSqlSearchCondition.Accept(visitor);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="sortOrder">
        /// The <see cref="SqlSortOrder"/> on which to accept the visitor.
        /// </param>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public static void Accept(this SqlSortOrder sortOrder, ISqlVisitor visitor)
        {
            if (visitor == null) throw new ArgumentNullException(nameof(visitor));

            visitor.Visit(sortOrder);
        }
Ejemplo n.º 26
0
 /// <summary>
 /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
 /// methods for this object.
 /// </summary>
 /// <param name="visitor">
 /// The <see cref="ISqlVisitor" /> to visit this object with.
 /// </param>
 public override void Accept(ISqlVisitor visitor)
 {
     base.Accept(visitor);
     Predicate.Accept(visitor);
 }
Ejemplo n.º 27
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="operator">
        /// The <see cref="SqlBinaryOperator"/> on which to accept the visitor.
        /// </param>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public static void Accept(this SqlBinaryOperator @operator, ISqlVisitor visitor)
        {
            if (visitor == null) throw new ArgumentNullException(nameof(visitor));

            visitor.Visit(@operator);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
        /// methods for this object.
        /// </summary>
        /// <param name="visitor">
        /// The <see cref="ISqlVisitor" /> to visit this object with.
        /// </param>
        public override void Accept(ISqlVisitor visitor)
        {
            base.Accept(visitor);

            _sortExpressions.Accept(visitor);
        }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     this.SqlSelectClause.Accept(visitor) ;
     this.SqlIntoClause.Accept(visitor);
     this.SqlFromClause.Accept(visitor);
     this.SqlWhereClause.Accept(visitor);
     this.SqlOrderByClause.Accept(visitor);
     this.SqlHavingClause.Accept(visitor);
     this.SqlGroupByClause.Accept(visitor);
     visitor.Visited(this);
 }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this) ;
     visitor.Visited(this) ;
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
 /// methods for this object.
 /// </summary>
 /// <param name="visitor">
 /// The <see cref="ISqlVisitor" /> to visit this object with.
 /// </param>
 public override void Accept(ISqlVisitor visitor)
 {
     base.Accept(visitor);
     Table.Accept(visitor);
     Joins.ForEach(join => join.Accept(visitor));
 }
 public override void Accept(ISqlVisitor visitor)
 {
     visitor.Visiting(this);
     this.sqlTableAlias.Accept(visitor) ;
     visitor.Visited(this);
 }
Ejemplo n.º 33
0
 /// <summary>
 /// Accepts the specified <paramref name="visitor"/> and dispatches calls to the specific visitor
 /// methods for this object.
 /// </summary>
 /// <param name="visitor">
 /// The <see cref="ISqlVisitor" /> to visit this object with.
 /// </param>
 public override void Accept(ISqlVisitor visitor)
 {
     base.Accept(visitor);
     Predicate.Accept(visitor);
 }