Example #1
0
        private Expression AliasByJoin(JoinChainer source, ByArgument arg)
        {
            var target = _GetTargetByAlias(source, arg.Alias, true);

            if (!source.HasNode || !target.HasNode)
            {
                throw JoinerException(source, target, QueryTalkExceptionType.InvalidJoinTable);
            }

            var expression = _GetMappedExpression(source, target, DB3.Default);

            source.AppendJoinGraph(target.JoinGraph);

            return(expression);
        }
Example #2
0
 private static Expression _GetNonMappedExpression(ByArgument byArg, string sourceAlias)
 {
     return(String.Format("{0}.{1} = {2}.{3}",
                          Filter.Delimit(sourceAlias), Filter.Delimit(byArg.Column),
                          Filter.Delimit(byArg.Alias), Filter.Delimit(byArg.Column)).E());
 }
Example #3
0
 private Expression NonMappedByJoin(JoinChainer source, ByArgument arg)
 {
     _GetTargetByAlias(source, arg.Alias, false);
     return(_GetNonMappedExpression(arg, source.Alias.Name));
 }