Ejemplo n.º 1
0
 /// <summary>
 /// 调用 SQL IN 函数
 /// </summary>
 /// <typeparam name="T">字段栏数据库类型</typeparam>
 /// <typeparam name="Table">数据库表数据库类型</typeparam>
 /// <param name="field">字段栏</param>
 /// <param name="gb">查询构建器</param>
 /// <returns>表示此SQL 函数的返回值类型。只能在 SQL 构建器中调用,当直接调用此 SQL 函数时将引发 <see cref="NotSupportedException"/> 异常。</returns>
 /// <exception cref="NotSupportedException">只能在 SQL 构建器中调用,当直接调用此 SQL 函数时将引发此异常。</exception>
 public static bool In_ <T, Table>(this T field, GetBuilder <Table> gb)
     where T : struct
     where Table : class, new()
 {
     throw new NotSupportedException("不能直接调用此方法,只能在 SQL 构建器中调用。");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 从指定查询构建器里查询数据,如“FROM (SQL 语句)”
 /// </summary>
 /// <param name="from">查询构建器</param>
 /// <returns>查询构建器</returns>
 public GetBuilder <T> From(GetBuilder <T> from)
 {
     __from = from;
     return(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 调用 SQL NOT IN 操作符(Where)
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <typeparam name="Table"></typeparam>
 /// <param name="field">字段栏</param>
 /// <param name="gb"></param>
 /// <returns>表示此SQL 函数的返回值类型。只能在 SQL 构建器中调用,当直接调用此 SQL 函数时将引发 <see cref="NotSupportedException"/> 异常。</returns>
 /// <exception cref="NotSupportedException">只能在 SQL 构建器中调用,当直接调用此 SQL 函数时将引发此异常。</exception>
 public static bool ExNotIn <T, Table>(this T field, GetBuilder <Table> gb)
     where Table : IModel
 {
     throw new NotSupportedException("不能直接调用此方法,只能在 SQL 构建器中调用。");
 }