Пример #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;
 }