Exemplo n.º 1
0
 public void TestSelect_17()
 {
     _clause.Select("a.[b],c,[d]", "o");
     _clause.AppendSql("e=1,");
     _clause.Select("f");
     _clause.AppendSql("g");
     _clause.Select("h");
     Assert.Equal("Select [a].[b],[o].[c],[o].[d],e=1,[f],g[h]", GetSql());
 }
Exemplo n.º 2
0
 /// <summary>
 /// 添加到Select子句
 /// </summary>
 /// <param name="action">子查询操作</param>
 /// <param name="columnAlias">列别名</param>
 /// <returns></returns>
 public virtual ISqlBuilder AppendSelect(Action <ISqlBuilder> action, string columnAlias)
 {
     SelectClause.AppendSql(action, columnAlias);
     return(this);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 添加到Select子句
 /// </summary>
 /// <param name="builder">Sql生成器</param>
 /// <param name="columnAlias">列别名</param>
 /// <returns></returns>
 public virtual ISqlBuilder AppendSelect(ISqlBuilder builder, string columnAlias)
 {
     SelectClause.AppendSql(builder, columnAlias);
     return(this);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 添加到Select子句
 /// </summary>
 /// <param name="sql">Sql语句</param>
 /// <returns></returns>
 public virtual ISqlBuilder AppendSelect(string sql)
 {
     SelectClause.AppendSql(sql);
     return(this);
 }
Exemplo n.º 5
0
 public void TestSelect_16()
 {
     _clause.AppendSql("a");
     Assert.Equal("Select a", GetSql());
 }