コード例 #1
0
 /// <summary>
 /// 组合 子查询    TODO
 /// </summary>
 /// <param name="field"></param>
 /// <param name="from"></param>
 /// <param name="join"></param>
 /// <returns></returns>
 private WhereClip subQuery(Field field, LambdaQueryHelper from, string join)
 {
     if (Field.IsNullOrEmpty(field))
     {
         return(null);
     }
     //if (from.DbProvider.dbType == dbType.MySql)
     //{
     //    return new WhereClip(string.Concat(field.TableFieldName, join, "(SELECT * FROM (", from.getPagedFromSection().SqlString, ") AS TEMP" + DataUtils.GetNewParamCount() + ")"), from.Parameters.ToArray());
     //}
     //return new WhereClip(string.Concat(field.TableFieldName, join, "(", from.getPagedFromSection().SqlString, ")"), from.Parameters.ToArray());
     return(null);
 }
コード例 #2
0
 /// <summary>
 /// EXISTS
 /// </summary>
 /// <param name="lambdaHelper"></param>
 /// <returns></returns>
 public static WhereClip Exists(LambdaQueryHelper lambdaHelper)
 {
     return(new WhereClip(string.Concat(" EXISTS (", lambdaHelper.GetSqlString(), ") "), lambdaHelper.Parameters.Values.ToArray()));
 }
コード例 #3
0
 /// <summary>
 /// SubQueryGreaterOrEqual   子查询
 /// </summary>
 /// <param name="from"></param>
 /// <returns></returns>
 public WhereClip SubQueryGreaterOrEqual(LambdaQueryHelper from)
 {
     return(subQuery(this, from, QueryOperator.GreaterOrEqual));
 }
コード例 #4
0
 /// <summary>
 /// SubQueryLess   子查询
 /// </summary>
 /// <param name="from"></param>
 /// <returns></returns>
 public WhereClip SubQueryLess(LambdaQueryHelper from)
 {
     return(subQuery(this, from, QueryOperator.Less));
 }
コード例 #5
0
 /// <summary>
 /// SubQueryNotEqual   子查询
 /// </summary>
 /// <param name="from"></param>
 /// <returns></returns>
 public WhereClip SubQueryNotEqual(LambdaQueryHelper from)
 {
     return(subQuery(this, from, QueryOperator.NotEqual));
 }
コード例 #6
0
 /// <summary>
 /// 组合 子查询
 /// </summary>
 /// <param name="field"></param>
 /// <param name="from"></param>
 /// <param name="oper"></param>
 /// <returns></returns>
 private WhereClip subQuery(Field field, LambdaQueryHelper from, QueryOperator oper)
 {
     return(subQuery(field, from, DataUtils.ToString(oper)));
 }
コード例 #7
0
 /// <summary>
 /// SubQueryNotIn   子查询
 /// </summary>
 /// <param name="from"></param>
 /// <returns></returns>
 public WhereClip SubQueryNotIn(LambdaQueryHelper from)
 {
     return(subQuery(this, from, selectNotInString));
 }