Пример #1
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);
 }
Пример #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 IColumnsListSimple SubQuery(IStatementSelect select, string alias = "")
 {
     if (!string.IsNullOrEmpty(alias))
     {
         alias = " AS " + SqlBuilder.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 string GetSQLSelectExist(IStatementSelect sql) =>
 "SELECT EXISTS (" + sql.GetSql(true) + ");";