예제 #1
0
 public IColumnsListSimple SubQuery(IStatementSelect select, string alias = "")
 {
     if (!string.IsNullOrEmpty(alias))
     {
         alias = " AS " + SqlBuilder.FormatColumnAlias(alias);
     }
     this.Raw('(' + select.GetSql(false) + ')' + alias);
     return(this);
 }
예제 #2
0
 public IColumnsListSimple SubQuery(IStatementSelect select, string alias = "")
 {
     if (!string.IsNullOrEmpty(alias))
     {
         alias = this.Parameters.AliasOperator + SqlBuilder.FormatColumnAlias(alias, this.Parameters);
     }
     this.Raw('(' + select.GetSql() + ')' + alias);
     return(this);
 }
예제 #3
0
 public IColumnsListAggregation SubQuery(IStatementSelect select, string alias = "")
 {
     if (!string.IsNullOrEmpty(alias))
     {
         alias = " as " + SuperSql.FormatColumnAlias(alias);
     }
     this.Raw('(' + select.GetSql(false) + ')' + alias);
     return(this);
 }
예제 #4
0
        public WhereList In(string column, IStatementSelect query)
        {
            CreateExpression(Enums.WhereType.In, column, " IN (" + query.GetSql(true).ToString() + ")");

            return(this);
        }
예제 #5
0
 public static IStatementSelect Columns(this IStatementSelect q, Func <IColumnsListAggregation, IColumnsListAggregation> f)
 {
     f.Invoke(q.Columns);
     return(q);
 }
예제 #6
0
 public static IStatementSelect Join(this IStatementSelect q, Func <IJoinList, IJoin> f)
 {
     f.Invoke(q.Join);
     return(q);
 }
예제 #7
0
 public static IStatementSelect GroupBy(this IStatementSelect q, Func <IGroupByList, IGroupByList> f)
 {
     f.Invoke(q.GroupBy);
     return(q);
 }
예제 #8
0
 public static IStatementSelect OrderBy(this IStatementSelect q, Func <IOrderByList, IOrderByList> f)
 {
     f.Invoke(q.OrderBy);
     return(q);
 }
예제 #9
0
 public static IStatementSelect Where(this IStatementSelect q, Func <IWhereList, IWhereList> f)
 {
     f.Invoke(q.Where);
     return(q);
 }
예제 #10
0
 public static IStatementSelect Where(this IStatementSelect q, Action <WhereList> f)
 {
     f.Invoke(q.Where);
     return(q);
 }
예제 #11
0
 public static IStatementSelect GroupBy(this IStatementSelect q, bool copyToColumns = false, params string[] columns)
 {
     q.GroupBy.Append(copyToColumns, columns);
     return(q);
 }
예제 #12
0
 public static IStatementSelect GroupBy(this IStatementSelect q, Action <GroupByList> f)
 {
     f.Invoke(q.GroupBy);
     return(q);
 }
예제 #13
0
 public static IStatementSelect OrderBy(this IStatementSelect q, params string[] columns)
 {
     q.OrderBy.Ascending(columns);
     return(q);
 }
예제 #14
0
 public static IStatementSelect OrderBy(this IStatementSelect q, Action <OrderByList> f)
 {
     f.Invoke(q.OrderBy);
     return(q);
 }
예제 #15
0
 public static IStatementSelect Where(this IStatementSelect q, params string[] columns)
 {
     q.Where.Equal(columns);
     return(q);
 }
예제 #16
0
파일: Db.cs 프로젝트: koshovyi/RockPas.com
 public static string GetSQLSelectExist(IStatementSelect sql) =>
 "SELECT EXISTS (" + sql.GetSql(true) + ");";
예제 #17
0
 public static IStatementSelect Columns(this IStatementSelect q, params string[] columns)
 {
     q.Columns.Append(columns);
     return(q);
 }