public static ReadOnlyCollection<T> VisitList<T>(ReadOnlyCollection<T> list, Func<T, T> elementVisitor); public static T VisitAndConvert<T> (T expression, string caller) where T : Expression; public static ReadOnlyCollection<T> VisitAndConvert<T>(ReadOnlyCollection<T> list, string caller) where T : Expression;
VisitList applies the elementVisitor function to each member of the list, returning the same list if each visitor call returned the original item. Otherwise, it returns a new list with the new items replacing the corresponding original ones.
VisitAndConvert for a single expression calls VisitExpression on the expression, then tries to cast it back to the type T. If the cast doesn't succeed (because the visitor's result is of a new type or null), an exception is thrown.
VisitAndConvert for lists combines VisitList with the single-expression VisitAndConvert method.
The new SQL backend should both be a good example of how to approach SQL generation using the new re-linq front-end (QueryModel, usw.) and provide a sound, extensible architecture backing re-store's LINQ provider.
It will sport SQL generation in three phases:
LINQ providers will be able to hook into each of the three steps for customization, optimization, and advanced query transformations.