예제 #1
0
        // Methods
        internal static SqlNode Reduce(SqlNode node, SqlNodeAnnotations annotations)
        {
            Reducer reducer = new Reducer();

            reducer.Annotations = annotations;
            return(reducer.Visit(node));
        }
예제 #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);
         }
     }
 }
예제 #3
0
 // Methods
 internal SqlParameterizer(ITypeSystemProvider typeProvider, SqlNodeAnnotations annotations)
 {
     this.typeProvider = typeProvider;
     this.annotations  = annotations;
 }
예제 #4
0
 internal SqlNode AddConversions(SqlNode node, SqlNodeAnnotations annotations)
 {
     this.visitor.Annotations = annotations;
     return(this.visitor.Visit(node));
 }
예제 #5
0
        // Methods
        internal static SqlNode Reduce(SqlNode node, SqlFactory factory, SqlNodeAnnotations annotations)
        {
            Visitor visitor = new Visitor(factory, annotations);

            return(visitor.Visit(node));
        }
예제 #6
0
 // Methods
 internal Visitor(SqlFactory factory, SqlNodeAnnotations annotations)
 {
     this.factory     = factory;
     this.annotations = annotations;
 }