Exemplo n.º 1
0
        // Methods
        internal static SqlNode Reduce(SqlNode node, SqlNodeAnnotations annotations)
        {
            Reducer reducer = new Reducer();

            reducer.Annotations = annotations;
            return(reducer.Visit(node));
        }
Exemplo n.º 2
0
 // Methods
 internal static void ThrowIfUnsupported(SqlNode node, SqlNodeAnnotations annotations,
                                         SqlProvider.ProviderMode provider)
 {
     if (annotations.HasAnnotationType(typeof(SqlServerCompatibilityAnnotation)))
     {
         Visitor visitor = new Visitor(provider);
         visitor.annotations = annotations;
         visitor.Visit(node);
         if (visitor.reasons.Count > 0)
         {
             throw Error.ExpressionNotSupportedForSqlServerVersion(visitor.reasons);
         }
     }
 }
Exemplo n.º 3
0
 // Methods
 internal SqlParameterizer(ITypeSystemProvider typeProvider, SqlNodeAnnotations annotations)
 {
     this.typeProvider = typeProvider;
     this.annotations  = annotations;
 }
Exemplo n.º 4
0
 internal SqlNode AddConversions(SqlNode node, SqlNodeAnnotations annotations)
 {
     this.visitor.Annotations = annotations;
     return(this.visitor.Visit(node));
 }
Exemplo n.º 5
0
        // Methods
        internal static SqlNode Reduce(SqlNode node, SqlFactory factory, SqlNodeAnnotations annotations)
        {
            Visitor visitor = new Visitor(factory, annotations);

            return(visitor.Visit(node));
        }
Exemplo n.º 6
0
 // Methods
 internal Visitor(SqlFactory factory, SqlNodeAnnotations annotations)
 {
     this.factory     = factory;
     this.annotations = annotations;
 }