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); }
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()); }
private Expression NonMappedByJoin(JoinChainer source, ByArgument arg) { _GetTargetByAlias(source, arg.Alias, false); return(_GetNonMappedExpression(arg, source.Alias.Name)); }