Ejemplo n.º 1
0
        public override SqlExpression VisitReference(SqlReferenceExpression reference)
        {
            var name = reference.ReferenceName;

            SetType(variableResolver.ReturnType(name));

            return(base.VisitReference(reference));
        }
Ejemplo n.º 2
0
        public override SqlExpression VisitReference(SqlReferenceExpression reference)
        {
            var refName = reference.ReferenceName;

            if (context.VariableResolver == null)
            {
                throw new ExpressionEvaluateException(String.Format("A resolver is required to dereference variable '{0}'.", refName));
            }

            try {
                var value = context.VariableResolver.Resolve(refName);
                return(SqlExpression.Constant(value));
            } catch (ExpressionEvaluateException) {
                throw;
            } catch (Exception ex) {
                throw new ExpressionEvaluateException(String.Format("An error occurred while trying to dereference '{0}' to a constant value", refName), ex);
            }
        }
Ejemplo n.º 3
0
 public override SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     columnNames.Add(reference.ReferenceName);
     return base.VisitReference(reference);
 }
Ejemplo n.º 4
0
        public override SqlExpression VisitReference(SqlReferenceExpression reference)
        {
            var name = reference.ReferenceName;
            dataType = variableResolver.ReturnType(name);

            return base.VisitReference(reference);
        }
Ejemplo n.º 5
0
            public override SqlExpression VisitReference(SqlReferenceExpression reference)
            {
                var refName = reference.ReferenceName;
                foreach (var column in selectColumns) {
                    if (refName.Equals(column.ResolvedName))
                        return SqlExpression.Reference(column.InternalName);
                }

                return base.VisitReference(reference);
            }
Ejemplo n.º 6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="reference"></param>
 /// <returns></returns>
 public virtual SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     return SqlExpression.Reference(reference.ReferenceName);
 }
Ejemplo n.º 7
0
 public override SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     return base.VisitReference(reference);
 }
Ejemplo n.º 8
0
 public virtual SqlExpression VisitReference(SqlReferenceExpression expression)
 {
     return(expression);
 }
        public override SqlExpression VisitReference(SqlReferenceExpression reference)
        {
            var refName = reference.ReferenceName;

            if (context.VariableResolver == null)
                throw new ExpressionEvaluateException(String.Format("A resolver is required to dereference variable '{0}'.", refName));

            try {
                var value = context.VariableResolver.Resolve(refName);
                return SqlExpression.Constant(value);
            } catch (ExpressionEvaluateException) {
                throw;
            } catch (Exception ex) {
                throw new ExpressionEvaluateException(String.Format("An error occurred while trying to dereference '{0}' to a constant value", refName), ex);
            }
        }
 public override SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     builder.Append(reference.ReferenceName);
     return reference;
 }
Ejemplo n.º 11
0
 public override SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     IsConstant = false;
     return(base.VisitReference(reference));
 }
Ejemplo n.º 12
0
            public override SqlExpression VisitReference(SqlReferenceExpression reference)
            {
                var refName = reference.ReferenceName;
                var origColumn = refName.Name;
                var resolvedColumn = checker.ResolveColumnName(origColumn);
                if (resolvedColumn == null)
                    throw new InvalidOperationException(String.Format("Column '{0} not found in table.", origColumn));

                if (!origColumn.Equals(resolvedColumn))
                    refName = new ObjectName(refName.Parent, resolvedColumn);

                return SqlExpression.Reference(refName);
            }
Ejemplo n.º 13
0
 public override SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     builder.Append(reference.ReferenceName);
     return(reference);
 }
Ejemplo n.º 14
0
 public override SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     IsConstant = false;
     return base.VisitReference(reference);
 }
Ejemplo n.º 15
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="reference"></param>
 /// <returns></returns>
 public virtual SqlExpression VisitReference(SqlReferenceExpression reference)
 {
     return(SqlExpression.Reference(reference.ReferenceName));
 }