/// <summary> /// 构建一个用于嵌套查询的子查询 [与Select(...)方法的构建方式一致]。 /// </summary> /// <param name="fields">要查询的字段列表。</param> /// <returns></returns> public SelectBlock Nested(params IDescription[] fields) { SelectBlock sblock = new SelectBlock(); foreach (IDescription des in fields) { sblock.AddElement(des); } return(sblock); }
/// <summary> /// 开始构建 SELECT 命令。 /// </summary> /// <param name="fields">要查询的字段列表(可以为字段信息入表达式对象)。</param> /// <returns></returns> public SelectBlock Select(params IDescription[] fields) { if (IsParsed) { ResetCommandBuilder(); } SelectBlock sb = new SelectBlock(); foreach (IDescription des in fields) { sb.AddElement(des); } CommandDescription = sb; return(sb); }